未能加载文件或程序集“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
  <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
第二步:打开位于下列地址的(%windir%/Microsoft.NET/Framework/v4.0.30319)aspnet_regiis.exe -iru 文件

posted on 2014-03-21 15:02  nanker  阅读(4049)  评论(0编辑  收藏  举报

导航