首页 > 代码库 > 部署网站出现System.ServiceModel.Activation.HttpModule错误

部署网站出现System.ServiceModel.Activation.HttpModule错误

1. 部署网站到IIS7.5,Window 2008的时候出现这个错误 

2. 错误信息 Server Error in ‘/’ Application. Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′. 

3. 解决办法 

这里需要注册一下ASP.NET 4.0 
在命令窗口里运行一下命令即可: 
一般默认的系统目录不变的话,应该是一下语句
C:/Windows/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -iru
否则:
aspnet_regiis.exe /iru The aspnet_regiis.exe file can be found in either %windir%\Microsoft.NET\Framework\v4.0.30319 %windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit machine)

  

部署网站出现System.ServiceModel.Activation.HttpModule错误