System.TypeLoadException for System.ServiceModel.Activation.HttpModule in ASP.NET 4

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

网上有一些解决方案,例如

http://blogs.msdn.com/b/webtopics/archive/2010/04/28/system-typeloadexception-for-system-servicemodel-activation-httpmodule-in-asp-net-4.aspx

最近在部署Asp.net网站时,不论如何配制IIS,重新注册.net都无法解决,总是报这个异常

最后在web.config文件中,发现不知道以前做了什么操作,在web.config自动加入了System.ServiceMode的信息,删除System.ServiceMode的信息之后,网站正常。

----------------------------------- http://www.cnblogs.com/rock_chen/
原文地址:https://www.cnblogs.com/rock_chen/p/2958256.html