Reputation: 893
The entire error message:
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Everywhere the solution for this problem is the re-registering aspNet by using aspnet_regiis.exe. But it did not work for me.
I have also tried the 1st and 2nd solutions proposed by the microsoft support team but still the same problem.
i'm trying to host my WCF Service on Windows server 2008, IIS7 using .NET 4
i have run out of ideas.
Upvotes: 1
Views: 1931
Reputation: 893
Go to IIS manager, in the left pane expand the node with the computer's name, then expand the Web Sites node, and then select the Default Web Site,double click Handler mappings in the Features View. In the list of application mappings, verify that the .svc file is mapped to the aspnet_isapi.dll. If the file has not been mapped: 1- Click Add Managed Handler.
2- Type *.svc into the Request path.
3- Type System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 into the Type textbox.
4- Type svc-Integrated-4.0 into the Name: textbox. Click OK.
5- Click Add Script Map.
6- Type *.svc into the Request path.
7- Type %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll into the Executable: text box.
8- Type svc-ISAPI-2.0 into the Name: text box. Click OK.
9- - Go to modules and delete ServiceModel.
Upvotes: 1
Reputation: 77856
See MSDN documentation on Troubleshooting: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel...'
You need to run the below command from command prompt as Administrator
aspnet_regiis.exe -iru
Then perform an
iisreset
Upvotes: 1