Reputation: 3665
I have a ASP 3.5 web forms app using windows authentication that needs to call a soap based web service (the SSRS 2005 report service) which uses integrated windows authentication. However the call to the web service from the asp backend keeps throwing a 401 error. If I turn on anonymous authenticatoin on the web service it works ok using the IUSR_xxx account however I want it to connect using the windows account of the user accessing the asp web app. How can I pass through the windows user credentials?
Upvotes: 1
Views: 5262
Reputation: 65887
you have to authenticate your webservice by supplying the default credential to your proxy. like this
localhost.ServiceX myProxy = new localhost.ServiceX();
myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
Upvotes: 4