Reputation: 89
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
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
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