Error message:

Server error in/application. Failed to set neutral from assembly "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken = b77a5c561934e089 "load type" System. The ServiceModel. Activation. HttpModule ". Note: An unhandled exception occurred during execution of the current Web request. Check the stack trace for more information about the error and the source of the error in your code. Exception details: System. TypeLoadException: Failed to set neutral from assembly "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken = b77a5c561934e089 "load type" System. The ServiceModel. Activation. HttpModule ".Copy the code

Cause of error: According to MSDN, this error occurs if.NET Framework 4 is installed and.net Framework 3.5 WCF HTTP activation is subsequently enabled.

Solutions:

To resolve this issue, run the following command line at the Visual Studio 2010 command prompt:

aspnet_regiis.exe -i -enable

Or run it in CMD: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i enable

The other:

After the command is executed, an error message is displayed at the command prompt:

An administration utility for installing and uninstalling ASP.NET on a local computer. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP.NET (4.0.30319.33440). This operating system version does not support this option. Administrators should install/uninstall ASP.NET 4.5 with IIS8 using the turn Windows features on or off dialog box, the server manager administration tool, or the dism.exe command line tool. Have more detailed information, please see http://go.microsoft.com/fwlink/?LinkID=216771. ASP.NET (4.0.30319.33440) installed.Copy the code

Cause: MY operating system is 64-bit, and DefaultAppPool is selected in the application pool of the website. Its.NET CLR version is V4.0, and managed pipeline mode is integrated. It is understood that 64-bit operating system hosting pipeline mode to choose classic mode.

Solution: Set the web application pool to “.net V4.5 Classic “in IIS. Its.NET CLR version is V4.0, and the managed pipeline mode is classic. Then set “Enable 32-bit applications” to “True” in the advanced Settings for this application pool and save. (Along those lines, it’s ok to set DefaultAppPool’s managed pipe mode to classic, but my rule is to do it as little as possible.)