1

I've created my service as a WCF Service Application. I've then published the service to a folder called "TestService". I'm trying to add it as a site to IIS Manager. Everything seems to go fine until I go to browse to the service I am always greeted with:

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

I'm browsing to this at http://localhost:8734 and the website is hosted in IIS at port 8734. The web.config has the following too:

<service behaviorConfiguration="TestServiceBehavior" name="TestApp.Service.TestService">
<endpoint address="/Authentication" binding="wsHttpBinding" bindingConfiguration="TestServiceBinding"
      contract="TestApp.Service.IAuthenticationService" />

// ... other endpoints

<host>
  <baseAddresses>
    <add baseAddress="http://localhost:8734/Design_Time_Addresses/TestApp.Service/Service1/" />
  </baseAddresses>
</host>

Any help would be appreciated.

Matt W
  • 323
  • 3
  • 14

1 Answers1

1

The service is hosted, you need to browse to the service endpoint eg http://localhost:8734/MyService.svc. The reason you are getting a 403 is because you are trying to browse the directory in which the application is deployed, and this is normally not allowed. You can turn directory browsing on with a web.config setting.

Matt Cole
  • 2,491
  • 17
  • 21
  • the svc file created from publishing the service is named TestApp.Service.TestService.svc, if I try to navigate to http://localhost:8734:TestApp.Service.TestService.svc I get HTTP Error 404.3 - Not Found – Matt W May 14 '15 at 12:10
  • You need use the path to your svc file relative to the root directory. The base address setting in your web.config can be used to alter this. [This question](http://stackoverflow.com/questions/6937853/wcf-service-endpoints-vs-host-base-address) has answers addressing how to use base address properly. – Matt Cole May 14 '15 at 12:28