Hi,
I have migrated my solution from beta 8 to RC1. After deploying application to IIS, a blank page is received on launch but there is no such issue with IIS Express when launching application from visual studio.
But before migration everything was fine.
project.json file:
{"webroot": "wwwroot","version": "1.0.0-*","dependencies": {"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final","Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final","Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final","Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final","Microsoft.Framework.ConfigurationModel.Interfaces": "1.0.0-beta4","Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final","Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final","Microsoft.Extensions.Logging": "1.0.0-rc1-final","Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final","Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final","PHRMS.BLL": "1.0.0-*","PHRMS.Data": "1.0.0-*","EntityFramework.Commands": "7.0.0-rc1-final","AutoMapper": "4.0.4","Microsoft.Net.Http": "2.2.22","System.Net.Http": "4.0.1-beta-23516","Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final","jQuery.jqGrid": "4.4.4","System.Linq.Dynamic.Library": "1.1.14","PHRMS.ViewModels": "1.0.0-*","Microsoft.AspNet.Mvc": "6.0.0-rc1-final","Microsoft.AspNet.Session": "1.0.0-rc1-final","Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final","Microsoft.Dnx.Compilation.CSharp": "1.0.0-rc1-final","EntityFramework.Core": "7.0.0-rc1-final","DocumentFormat.OpenXml": "2.5.0","Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final","Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final","Microsoft.AspNet.Http.Features": "1.0.0-rc1-final" },"commands": {"web": "Microsoft.AspNet.Server.Kestrel","ef": "EntityFramework.Commands" },"frameworks": {"dnx451": {"frameworkAssemblies": {"WindowsBase":"4.0.0" },"dependencies": { } } },"publishExclude": ["node_modules","bower_components","**.xproj","**.user","**.vspscc" ],"exclude": ["wwwroot","node_modules","bower_components" ] }
Startup.cs file:
using System; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Hosting; using PHRMS.Data.DataAccess; using Microsoft.AspNet.Http; using Microsoft.AspNet.Authentication.Cookies; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace PHRMS.Web { public class Startup { public static IConfiguration Configuration { get; set; } public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) { // Setup configuration sources. var configurationBuilder = new ConfigurationBuilder().SetBasePath(appEnv.ApplicationBasePath).AddJsonFile("config.json").AddEnvironmentVariables(); Configuration = configurationBuilder.Build(); } public void ConfigureServices(IServiceCollection services) { // Add EF services to the services container. services.AddEntityFramework().AddSqlServer().AddDbContext<PHRMSDbContext>(); services.AddMvc(); services.AddCaching(); services.AddSession(o => { o.IdleTimeout = TimeSpan.FromMinutes(30); });
//Resolve dependency injection services.AddScoped<IPHRMSRepo, PHRMSRepo>(); services.AddScoped<PHRMS.BLL.CatalogService>(); } public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env) { loggerFactory.MinimumLevel = LogLevel.Information; // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 app.UseIISPlatformHandler(); app.UseStaticFiles(); app.UseSession(); // Add the following to the request pipeline only in development environment. if (string.Equals(env.EnvironmentName, "Development", StringComparison.OrdinalIgnoreCase)) { app.UseBrowserLink(); app.UseDeveloperExceptionPage(); } else { // Add Error handling middleware which catches all application specific errors and // send the request to the following path or controller action. app.UseExceptionHandler("/Home/Error"); } app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}"); }); } } }
global.json:
{"projects": [ "src", "test","PHRMS.Data" ],"sdk": {"version": "1.0.0-rc1-final","runtime": "clr","architecture": "x86" } }
Please guide me in resolving the issue.
Thanks!
Regards
Piyush Arora