I've a .Net 4.0 windows application running on Windows 7 and Windows XP. One of the modules in the app connects to a url on the internet[say http://abc.com/xyz/MyWebService] using their web service.This functionality has been working until last week when I started to get this error message when invoking a method on the webservice
There was no endpoint listening at http://abc.com/xyz/MyWebService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.And the InnerException was:HTTP Error 407 Proxy authentication required
I re-ran this code[on Windows 7] multiple times and I found out that this behavior is random...ie.sometimes am able to invoke webservice method on the server without any error.
Not sure whats going on behind the scenes and what could explain this random behavior. Also, this error does not come on a machine which has Windows XP that is located in a different geographical location on the company intranet.
Any ideas?
Note:When I added following node in my app.config, the error seems to have gone:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
</defaultProxy>
</system.net>