简体   繁体   中英

Running ASP.NET MVC 6 Web API from IIS

I create a MVC 6 Web API project that is running as expected from Visual Studio, when I'm however deploying to production I'm getting a

An error occured while starting the application

error.

在此处输入图片说明

I did the following on the production machine

  • Installed ASP.NET 5 from https://get.asp.net
  • Made sure that the production environment is running the same dnx version that the application was published with
  • Installed HttpPlatformHandler 1.2
  • Set the application pool .NET CLR Version to No Managed Code
  • Pointed the root location to the wwwroot folder

Is there anything else that I'm missing?

When you run into 500 errors, remember that ASP.NET 5 application can be self hosted,

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

I had some reference problems within my application that was listed in my command prompt which I subsequently fixed and everything worked as expected.

500 can be thrown by different failures. Take a look on http://docs.asp.net/en/latest/publishing/iis.html what u've missed in your configuration. And you should call it ASP.NET Core 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM