Need help with WCF EndpointNotFoundException TCP error code 10061
I'm a WCF noob, so I sincerely hope I'm doing something obviously wrong. Still, I've looked all over and although there seems to be numerous errors similar to TCP error code 10061, they seem to apply to different scenarios.
All I'm trying to do here is simply host a wsHttpBinding service from IIS, and have a console app on that same server connect to the WCF service. Any help makes you awesome in my eyes. I've looked at so many help pages, I'm sort of wrapped around the axle at this point. Thanks very much for your ideas and recommendations. Below is the error message I get after running the console app.
Unhandled Exception: System.ServiceModel.EndpointNotFoundException: Could not connect to http://mysite.com/Service/MyService.svc. TCP error code 10061: No connection c开发者_运维百科ould be made because the target machine actively refused it . ---> System.Net.WebException: Unable to con nect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
First thing you need to verify is: Can you browse to http://mysite.com/Service/MyService.svc ?
If that doesn't work your app has no hope of doing better.
EDIT
Second question: can you access it from the machine your app is running on with the user the app will be running under? These may seem like silly questions, but with "weird issues" like this, ya gotta start at ground floor. Plus you didn't mention what you HAVE tried :).
You might also want to check that the Net.Tcp Port Sharing Service is enabled.
精彩评论