开发者

Bizarre System.Net.WebException

I have a program that makes repeated calls to a web service that works fine during the day, but during nightly builds and testing the program repeatedly throws the following exception:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.14.115:8090 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 开发者_运维知识库 at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

Oddly enough, if I point a web browser at the web service it works fine so IIS/firewall isn't blocking it. Also, even though the service requires Windows Authentication, both myself and the account the nightly test runs on have permissions to the web site. Any help?


Have you logged/checked ErrorCode of SocketException? If you are able to capture error code, you can browse Windows Sockets version 2 API error code documentation for more details on the reason.


I know it's not very likely but you may want to double check that the account you are using to run the nightly test has permissions to login during the night.

We had a similar problem a while ago, whereby the Active Directory Admin created a user for us to be used against a web service, using some kind of default policy. The default policy was that users can only login between 7am and 9pm or something.

I know.....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜