Cecile
Cecile

Reputation: 89

Cannot access IIS 7.5 hosted WCF service from client

I have a WCF webservice that is hosted in IIS 7.5. Inside the Service solution I have a test client that is able to invoke the service with no issues. even tested it with the Visual studio WCF client test tool. However whenever i try to access the service using a client build on another solution i get the error: System.ServiceModel.CommunicationException TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions.

Any hint to solve this issue?

thanks.

Upvotes: 1

Views: 2950

Answers (2)

Flea
Flea

Reputation: 11284

I had this same problem and in my case it was caused by end point having the same port as my base host address:

<endpoint address="net.tcp://localhost:8081/evalservice" binding="netTcpBinding"
  bindingConfiguration="" contract="EvalServiceLibrary.IEvalService" />
<host>
  <baseAddresses>
    <add baseAddress="http://localhost:8080/evalservice" />
  </baseAddresses>
</host>

So, I changed my TCP port to be 8081 and that fixed the error. I am just doing this for learning purposes so not sure if this is a solution that would work in a production situation.

Upvotes: 1

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65491

To get WCF to work on IIS 7.5 you must enable some services. See: http://www.aaronlerch.com/blog/2007/12/11/enabling-wcf-services-within-iis-on-windows-vista/

Upvotes: 1

Related Questions