T
The Man From SQL
Hello,
I have a v1.1 Windows Service that calls a v1.1 web service asynchronously.
Both the windows service and web service are on the same Server 2003 machine.
The Web Service is wrapped in Oracle CoreID for security and uses Integrated
Windows Authentication with Basic as the authentication level. The Windows
Service runs under a Windows Account (let's call it TMP\bob). The CoreID
consumer instructions are that I only need to explicitly set the web client
proxy's credentials to DefaultCredentials, like so:
ws.Credentials = System.Net.CredentialCache.DefaultCredentials;
When I try to access the web service front page from a browser and enter the
bob's credentials at the login prompt, I am able to access the site.
When I call the web service from a console app specifying DefaultCredentials
(my own windows account also has permissions to access this web service), I
am able to access the site.
When I call the web service from a console app and create a new
NetworkCredential for TMP\bob, I am able to access the site.
When I create a Windows Service and run it under either my login or bob's
login and try to call the web service, I get an HTTP 401 Unauthorized error.
I've read online about the double hop problem, but mostly in relation to
ASP.NET clients, not Windows Service clients. Plus, it works from a console
app.
I'm at a loss as to what to do and I don't want to have to store and encrypt
the user name and password somewhere. Can someone explain why the Windows
Service call doesn't work and some possible workarounds?
Thanks very much,
TheManFromSQL
I have a v1.1 Windows Service that calls a v1.1 web service asynchronously.
Both the windows service and web service are on the same Server 2003 machine.
The Web Service is wrapped in Oracle CoreID for security and uses Integrated
Windows Authentication with Basic as the authentication level. The Windows
Service runs under a Windows Account (let's call it TMP\bob). The CoreID
consumer instructions are that I only need to explicitly set the web client
proxy's credentials to DefaultCredentials, like so:
ws.Credentials = System.Net.CredentialCache.DefaultCredentials;
When I try to access the web service front page from a browser and enter the
bob's credentials at the login prompt, I am able to access the site.
When I call the web service from a console app specifying DefaultCredentials
(my own windows account also has permissions to access this web service), I
am able to access the site.
When I call the web service from a console app and create a new
NetworkCredential for TMP\bob, I am able to access the site.
When I create a Windows Service and run it under either my login or bob's
login and try to call the web service, I get an HTTP 401 Unauthorized error.
I've read online about the double hop problem, but mostly in relation to
ASP.NET clients, not Windows Service clients. Plus, it works from a console
app.
I'm at a loss as to what to do and I don't want to have to store and encrypt
the user name and password somewhere. Can someone explain why the Windows
Service call doesn't work and some possible workarounds?
Thanks very much,
TheManFromSQL