Sometimes when you build a WCF service website and run it in IIS you see the error message from the page:
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. ...
Normally this happens when you enable IIS after installed .Net 4.0 thereby the app pool is still running on .Net 2.0 but your service references to a 4.0 version System.ServiceModel. To fix it just re-register the IIS to use .Net 4.0 with the current version of aspnet_regiis.exe (x86 or x64, version v4.0.30319) like this:
aspnet_regiis.exe -iru
Of cause make sure you are running the command line window as administrator if it is Windows 7.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment