Simple problem. I start up VS2008 and create a new WCF Service application. This will create a default application with a few test methods showing it works. I press CTRL+F5 and
If you faced this problem for the first time. with Windows 8 and IIS 8.0 make sure to activate Windows Communication Foundation HTTP windows feature.
I had to tick "HTTP Activation" in "Add Role Services" within Windows Server 2012.
The problem, however, is then to re-register ASP.Net to IIS, which is explained below.
And also if you're on a 64bit machine always use Framework64 paths: C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -iru
Below is the explanation from Microsoft:
http://download.microsoft.com/download/0/A/E/0AEB3BC1-506E-4954-8AB1-4FA2EE75985C/ReleaseNotes.docx
When attempting to run a service that receives messages over the HTTP transport, you may receive an error similar to the following:
Server Error in '/WCFApplication' 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. 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'.
This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.
To resolve this problem, you must use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe -iru
And credit, where it's due: Source
try to install IIS by expanding your Internet information service and then check ASP.Net 3.5 or ASP.Net 4.5 and ISAPI.... in root of world wide......... please look image to more help
I tried running ServiceModelReg and aspnet_regiis.exe with various flags and added HTTP Activation feature but it still didn't work. What finally worked was adding the following handler manually to my web.config file.
<system.webServer>
<handlers>
<add name="svc-Integrated" path="*.svc" verb="GET,HEAD,POST,DEBUG" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
My project was running .Net 3.5 and IIS was 7.5 and 7.0.
Click Start -> Run cmd
and type:
cd "\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation"
ServiceModelReg.exe -i