troubleshooting Question

HTTP status 401: Unauthorized when connectiong to webservice - cannot authenticate from localhost

Avatar of PatrickK_W
PatrickK_WFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASP.NETMicrosoft IIS Web ServerWCF
5 Comments1 Solution779 ViewsLast Modified:
Hi. Weird one. We have a webservice secured in an website that requires windows authentication. This has been working for about 3 year. Last week one of th guys did some messing around trying to install some SSL certificates, adding IP addresses, etc.
Since then, we cannot authenticate to the webservice from the local machine – ie:

We have a webservice on server1 in a website using host headers. If we try to call the
webservice from another site on this server in code (passing valid  credentials) it gives us a 401 error. If we try to access the webservice from server 2 using the same credentials it lets us in. It just cannot seem to authenticate on server 1 when called from server 1.

We setup the webservice on server2 with the exact same settings. If we call the webservice that is on server 2 form server 2 it works. If we call the webservices that is on server2 from server 1 that also works.

Server1->server1 – does not work – 401 error
Server1->server 2 works
Server2->server1 – works
Server2->server2 – works

The credentials being passed are the same for all calls. The credentials are the default credentials from the credential store. If we test to ensure we have a valid user, we do in all cases. We have also tried explicitly passing a username, password and domain as a new set of credentials witht eh exact same results (it works for all bar server1->server1).
Any ideas?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros