Reputation: 45801
I am using IIS 7.0 to host a simple WCF service. I write it by using VSTS 2008 + .Net 3.5 + C#. The issue is when I access http://localhost:9999/service.svc (I suppose in web browser we can browse the content of WSDL, and I create a new web site which uses port 9999 and run application pool under administrator account), I am met with the following error, any ideas what is wrong?
http://i27.tinypic.com/a9r8cz.jpg
Here is my service.svc:
<%@ ServiceHost Language="C#" Service="Gu.WCF.StudentManagement" %>
Here is my web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="Gu.WCF.ServiceBehavior"
name="Gu.WCF.StudentManagement">
<endpoint address="" binding="basicHttpBinding" contract="Gu.WCF.IStudentManagement">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Gu.WCF.ServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Upvotes: 0
Views: 1270
Reputation: 56540
Sounds like the .NET 3.0 ISAPI mappings have vanished. In the .NET 3.0 WCF directory (C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation) run ServiceModelReg -r
Upvotes: 1
Reputation: 10774
Please make sure that you have the .svc extension mapped to the ISAPI handler.
Upvotes: 1