• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    win8 Could not load type System.ServiceModel.Activation.HttpModule 错误解决方案
    From:http://support.microsoft.com/kb/2015129

    Symptoms

      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'.

     

    Cause

      This issue occurs because the Applicationhost.config file for Windows Process Activation Service (WAS) has the following section defined, and this section is incompatible with the .NET Framework 4.0:

    add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />

      This section should be defined as follows:

    add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />

      Note You can find the Applicationhost.config file in the following location:

    %windir%\system32\inetsrv\config

     

    Resolution

      To resolve this issue, run the following command line: 

    aspnet_regiis.exe /iru

      The Aspnet_regiis.exe file can be found in one of the following locations:

    %windir%\Microsoft.NET\Framework\v4.0.30319

    %windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit computer)

     

    注意

      以上方案在win8系统中无效,因为在最后一步运行 aspnet_regiis.exe /iru 命令时会失败,所以解决方案是找到 Applicationhost.config 文件(目录在%windir%\system32\inetsrv\config),然后把文件中的:

    add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />

      改为:

    add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />

      我目前只找到这种方案,如果有更好方案欢迎指出。

    作者:Artwl
    出处:http://artwl.cnblogs.com

    上一篇:windows 2003打开本地用户和组提示无权限的解决方法
    下一篇:WIN8里的USB无线热点(AP)不能用的解决方法
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    win8 Could not load type System.ServiceModel.Activation.HttpModule 错误解决方案 win8,Could,not,load,type,System.ServiceModel.Activation.HttpModule,