Here write code slices developed based on environment Winserver 2008 R2,.net 4.5,asp.net mvc5.
1, install the. NET Framework 4.5, download offline package installation, it is best not to network installation.
2. Using the IIS server, the was and W3SVC service must be started.
3, if not in accordance with the normal installation of IIS after the order of. NET, you need to register ASP.net 4.5 to IIS.
32-bit Windows:
---------------------------------------------------------------------------
1. Run->cmd
2. CD C:\Windows\Microsoft.NET\Framework\v4.0.30319
3 aspnet_regiis.exe-i
64-bit Windows:
----------------- ----------------------------------------------------------
1. Run->cmd
2. CD C:\Windows\ microsoft.net\framework64\v4.0.30319
3. aspnet_regiis.exe-i
After you install vs2015 update3, and then install IIS, the following error occurs when you access WEBAPI:
HTTP Error 500.21-internal Server error
Handler "extensionlessurlhandler-integrated-4.0" has an error module "Managedpipelinehandler" in its module list
At this time, the same need to register, the registration method is as follows:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe-i
4, set the "ASP.net v4.0.0.30319" in the ISAPI and CGI restrictions for IIS as permitted, as shown in the following illustration:
5, add application pool, the. NET version selects the. NET Framework v4.0.30319, note: There is no. NET 4.5 optional in the application pool because. NET 4.5 is only a patch for. NET 4.0, not a new version, So you can run any. NET 4.5 Web site in a. NET 4.0 application pool. The managed piping mode is set to "integrated."
6, add Web site, set up virtual directory and physical directory.
7. Errors occur during deployment The Web server is configured to not list the contents of this directory. ”。
The workaround is to add the following configuration section to the web.config.
<system.webServer>
<modules runallmanagedmodulesforallrequests= "true"/>
</ System.webserver>