Search code examples
c#web-serviceshttpstatushttp-status-code-407

The request failed with HTTP status 407: authenticationrequired.


Ok folks .. heres the deal -->

I have consumed a web-service in my console app and am able to successfully invoke the same when running from my local machine.

Trouble brews when I deploy the app on my Win 2K8 box. I first came up on -> The remote name could not be resolved: 'www.www.net' -> and so I added a WebProxy and hooked it up to the .Proxy property of the web-service.

The next error I have run into is -> The request failed with HTTP status 407: authenticationrequired. And I am at a loss of ideas to resolve the same.

I have used --> .Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; and have also explicitly defined proxy creds -> username, password, domain --> but to no avail

The web-service works fine when accessed over a browser from within the server.

Any help would be highly appreciated.

Thanks for your time.

Rgds,


Solution

  • Ok .. heres what got it working finally -->

    Got in touch with the NOC (network) guys - and they in turn turned on an explicit IP-based access to requests/response to/from the server.

    Will that result in a security breach - well I am not sure.

    Rgds,