B
blue_nirvana
I'm new to the impersonation thing and so I was hoping I could get some help.
I have a Web Service that is setup to use Integrated authenication with
anonymous access turned off. I call the web service using:
Dim ws as New Webservicename.Service1()
ws.Credentials = New NetworkCredential("username", "password", "domain")
ws.DoSomething()
The web service works perfect if I have the following:
<identity impersonate="true" userName="domain\username" password="password"/>
located in the webconfig file, but does not work if I use:
<identity impersonate="true" />
Using either one, I get authenicated using the credentials I pass in. I can
see this by using WindowsIdentity.GetCurrent().Name. Looks like using the
later does not make all request using that impersonation.
From my understanding using, <identity impersonate="true"
userName="domain\username" password="password"/> in the webconfig file,
causes all request in my web service to use that impersonation. But using,
<identity impersonate="true" /> doesn't. I don't want to store a username
and password in the webconfig file. I always want to pass the credentials
in. Finally the question: How can I use <identity impersonate="true" /> and
pass in the credentals and force all request to be called using that
impersonation?
Hope this makes sense.
Thanks
I have a Web Service that is setup to use Integrated authenication with
anonymous access turned off. I call the web service using:
Dim ws as New Webservicename.Service1()
ws.Credentials = New NetworkCredential("username", "password", "domain")
ws.DoSomething()
The web service works perfect if I have the following:
<identity impersonate="true" userName="domain\username" password="password"/>
located in the webconfig file, but does not work if I use:
<identity impersonate="true" />
Using either one, I get authenicated using the credentials I pass in. I can
see this by using WindowsIdentity.GetCurrent().Name. Looks like using the
later does not make all request using that impersonation.
From my understanding using, <identity impersonate="true"
userName="domain\username" password="password"/> in the webconfig file,
causes all request in my web service to use that impersonation. But using,
<identity impersonate="true" /> doesn't. I don't want to store a username
and password in the webconfig file. I always want to pass the credentials
in. Finally the question: How can I use <identity impersonate="true" /> and
pass in the credentals and force all request to be called using that
impersonation?
Hope this makes sense.
Thanks