Re: HELP with Impersonation
- From: "Henning Krause [MVP]" <newsgroups.remove@xxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Apr 2006 22:31:35 +0200
Hello,
you need to add a
<configuration>
<system.web>
<authentication mode="Windows" />
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>to you web config.
Then the impersonation should work as expected.
Greetings,
Henning Krause
"blue_nirvana" <bluenirvana@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EDFF1F86-E151-452E-8132-3CEF20889E6C@xxxxxxxxxxxxxxxx
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
.
- Prev by Date: Re: HELP with Impersonation
- Next by Date: Re: Single Sign-On (Exchange 2003 style) for ASP.NET
- Previous by thread: Re: HELP with Impersonation
- Index(es):
Relevant Pages
|