国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Windows > 正文

win8 Could not load type System.ServiceModel.Activation.HttpModule 錯誤解決方案

2019-11-28 03:58:03
字體:
來源:轉載
供稿:網友
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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 普洱| 牟定县| 江城| 天全县| 泸溪县| 上林县| 措美县| 梨树县| 荥经县| 安康市| 城固县| 阿巴嘎旗| 高州市| 从江县| 巴林左旗| 瓦房店市| 南溪县| 永吉县| 广安市| 彰化县| 绍兴市| 安阳县| 中山市| 海安县| 宁南县| 唐山市| 开封县| 扎赉特旗| 邢台县| 清河县| 乐业县| 营山县| 沙田区| 曲阳县| 正宁县| 龙口市| 黔江区| 黎平县| 桐梓县| 漾濞| 安塞县|