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的資訊之後,網站正常。