0
votes

I am trying to host a WCF service written in .NET 3.5 in IIS 7.5 on a Windows 7 64 bit machine, without much luck. I also have Sharepoint 2010 installed on the machine. Here is my setup:

The physical path of the folder with .svc file is: C:\inetpub\wwwroot\SmartSolution\Services\Services\ContainerManagementService.svc

I have created a web application in IIS for both Services folders.

Here is the config file for the WCF service:

      <service behaviorConfiguration="MyNamespace.ContainerManagementServiceBehavior"
    name="MyNamespace.ContainerManagementService">
    <endpoint address="" binding="basicHttpBinding"
       name="ContainerManagementbasicHttpEndpoint" contract="MyNamespace.IContainer"/>                  
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8000/ContainerManagementService" />
      </baseAddresses>
    </host>
  </service>      
   <behaviors>      
    <behavior name="MyNamespace.ContainerManagementServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
</behaviors>

When I try to browse to: http://localhost/SmartSolution/Services/Services/ContainerManagementService.svc , I get the following error: Service Error message

and if I click "Go back to site" I'm taken to my Sharepoint Central admin for some reason. How can I get the IIS service hosting working?

Thanks!

1

1 Answers

0
votes

You have exposed the service on port 8000 so you need to call it at http://localhost:8000/ContainerManagementService