Repairing WCF on IIS

Tried to create a web host for my WCF Service today and was greeted with the following error:

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

I already had HTTP Activation enabled on my IIS and configured the web site to use .NET 4.0. After some searching, I found the solution.

Just need to run aspnet_regiis -iru on a Visual Studio Command Prompt to solve the issue. 

No comments:

Post a Comment

Popular Post