K
Kevin Harrison
I have an IIS6 site set to Windows Authentication only.
It contains a WebService that the site tries to access, however the SOAP
request always returns a 401 error:
The request failed with HTTP status 401: Unauthorized.
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
I've also tried consume it from an application with the same results.
The current Windows Identity (for the consuming site / application) is a
comain account with permission to access the WebService. I.e. the following
returns details of an NTLM domain account with permissions to access the web
service:
System.Security.Principal.WindowsIdentity.GetCurrent()
I've tried setting the identity for the current thread in the consumer, but
this doesn't make any difference (am I barking up the wrong tree?), i.e.:
System.Threading.Thread.CurrentPrincipal = new
System.Security.Principal.WindowsPrincipal(System.Security.Principal.Windows
Identity.GetCurrent())
How can I consume my Web Service?
BTW: The URL for the web service is in the Local Intranet zone on IE for all
clients.
It contains a WebService that the site tries to access, however the SOAP
request always returns a 401 error:
The request failed with HTTP status 401: Unauthorized.
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
I've also tried consume it from an application with the same results.
The current Windows Identity (for the consuming site / application) is a
comain account with permission to access the WebService. I.e. the following
returns details of an NTLM domain account with permissions to access the web
service:
System.Security.Principal.WindowsIdentity.GetCurrent()
I've tried setting the identity for the current thread in the consumer, but
this doesn't make any difference (am I barking up the wrong tree?), i.e.:
System.Threading.Thread.CurrentPrincipal = new
System.Security.Principal.WindowsPrincipal(System.Security.Principal.Windows
Identity.GetCurrent())
How can I consume my Web Service?
BTW: The URL for the web service is in the Local Intranet zone on IE for all
clients.