Running ASP.NET MVC 6 Web API from IIS


Andre Lombaard

I created an MVC 6 Web API project which is working as expected in Visual Studio, but when I deploy to production I get a

An error occurred while launching the application

mistake.

enter image description here

I did the following on a production machine

  • Installed ASP.NET 5 from https://get.asp.net
  • Make sure the production environment is running the same version of dnx as the application was released
  • HttpPlatformHandler 1.2 installed
  • Set the app pool .NET CLR version to "No Managed Code"
  • Point the root directory to the wwwroot folder

Is there anything else I'm missing?

Andre Lombaard

When you get 500 errors, remember that ASP.NET 5 applications can self-host,

  • Open a command prompt
  • Browse to the application directory
  • Enter web.cmd

Some reference issues in my app were listed in my command prompt and I fixed it and everything worked fine.

Related


Running ASP.NET MVC 6 Web API from IIS

Andre Lombaard I created an MVC 6 Web API project which is working as expected in Visual Studio, but when I deploy to production I get a An error occurred while launching the application mistake. I did the following on a production machine Installed ASP.NET 5

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 Web.API on IIS

spine development I have created an application in ASP.NET 5. Currently, I'm just trying to expose a very simple Web.API method to get it working. The controller looks like this: using System.Threading.Tasks; using Microsoft.AspNet.Mvc; namespace Api { [R

Does ASP.NET MVC 5.1, ASP.NET Web API 2.1 require IIS 7.5?

Alexander Puchkov After upgrading the project to WebApi 2.1 and MVC 5.1, I get the following error on IIS7: This operation requires running IIS 7.5 or later in integrated pipeline mode. Description: An unhandled exception occurred during the execution of the c

Help page for ASP.NET vNext MVC 6 Web Api

Ma Teng I'm currently checking out asp.net vnext MVC6 in Visual Studio 2015 preview. I'm pretty new to asp.net in general, but inside the company we're moving towards creating a web api using asp.net to access data on the server (currently we only support doin

Help page for ASP.NET vNext MVC 6 Web Api

Ma Teng I'm currently checking out asp.net vnext MVC6 in Visual Studio 2015 preview. I'm pretty new to asp.net in general, but inside the company we're moving towards creating a web api using asp.net to access data on the server (currently we only support doin

Help page for ASP.NET vNext MVC 6 Web Api

Ma Teng I'm currently checking out asp.net vnext MVC6 in Visual Studio 2015 preview. I'm pretty new to asp.net in general, but inside the company we're moving towards creating a web api using asp.net to access data on the server (currently we only support doin

Help page for ASP.NET vNext MVC 6 Web Api

Ma Teng I'm currently checking out asp.net vnext MVC6 in Visual Studio 2015 preview. I'm pretty new to asp.net in general, but inside the company we're moving towards creating a web api using asp.net to access data on the server (currently we only support doin

Help page for ASP.NET vNext MVC 6 Web Api

Ma Teng I'm currently checking out asp.net vnext MVC6 in Visual Studio 2015 preview. I'm pretty new to asp.net in general, but inside the company we're moving towards creating a web api using asp.net to access data on the server (currently we only support doin

Keep .NET 5 Web API running in IIS

Royal Air Force I'm hosting a .Net 5 Web API on IIS 10. I configured the IIS application pool and IIS site as described here . Install Server Features - Application Initialization Module Set the startup mode to AlwaysRunning Set preload enabled to True Set idl