I'm struggling to get my ASP.Net core 1 (asp.net 5 / MVC 6) app running within IIS on my webserver. I've followed the guides and done the following on the server
- Install ASP.Net 5 via get.asp.net
- Install HttpPlatformHandler 1.2
I've checked that I can run dnx on the server and that the compiled bits are 64 bit and that the application pool is "No Managed Code" and running as 64 bits.
I can run the app on the webserver by running web.cmd and navigating to http://localhost:5000 (or whatever port), however when I try and setup the app as an application within the Default Website and browse to it (e.g. http://localhost/MyMVC6App) I get a 404 error. I've checked that the physical path is pointing to /MyMVC6App/wwwroot. I've also checked that the webserver/handlers section is unlocked.
I've also created a vanilla ASP.Net 5/Core 1 app and get the same 404 error on 2 different servers!
Here is my configure method:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseApplicationInsightsRequestTelemetry();
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseIISPlatformHandler();
app.UseApplicationInsightsExceptionTelemetry();
app.UseStaticFiles();
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
Any ideas?