Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

401: Unauthorized error with a web service

Status
Not open for further replies.

kristof

Programmer
Jun 2, 2000
234
0
0
BE
Hi,

I have a Web service with basic authentication active on IIS, to which I pass a NetworkCredential object:

Code:
NetworkCredential objCredential = new NetworkCredential("UID", "PWD");

myWebserviceObject.Credentials = objCredential;

On my local test solution, everything works fine.

Yet, on the website on the server that is to use the web service, I still get the 401 error. I don't get any compilation errors, so code-wise it looks fine to me. It finds the Web service, but simply does not seem able to authenticate it.

Any ideas? Thanks
 
Nevermind, it was a config error on IIS level. Had nothing to do with the code :p
 
Getting IIS configured correctly is half the battle.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top