未能加载文件或程序集“System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它...

由于引用了高版本的 System.ServiceModel.

http://support.microsoft.com/kb/2015129

Consider the following scenario. You install the .NET Framework 4.0. Then, you install an earlier version of the .NET Framework, or you enable .NET 3.0 WCF HTTP Activation. In this scenario, you may receive the following error message when you when run applications that are hosted on Internet Information Services (IIS):

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

 

Slove Methods:

第一步:修改配置文件 %windir%/system32/inetsrv/config/applicationHost
 
第二步:打开位于下列地址的(%windir%/Microsoft.NET/Framework/v4.0.30319)aspnet_regiis.exe -iru 文件

转载于:https://www.cnblogs.com/nankeryun/p/3615903.html

你可能感兴趣的:(未能加载文件或程序集“System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它...)