Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > WindowsImpersonationContext

Reply
Thread Tools

WindowsImpersonationContext

 
 
Sorin Sandu
Guest
Posts: n/a
 
      08-12-2004
This code is valid only for current page ?
WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
WindowsImpersonationContext impersonatedUser = newId.Impersonate();
After I impersonate current user and Response.Redirect to another page there
WindowsIdentity is changed to user before Impersonate.
Is it normal ?
How can I do to maintain Impersonation to all my pages ?


 
Reply With Quote
 
 
 
 
tma
Guest
Posts: n/a
 
      08-12-2004
See if these two articles don't help.

http://msdn.microsoft.com/msdnmag/is...c/default.aspx
http://msdn.microsoft.com/msdnmag/issues/02/05/ASPSec2/

"Sorin Sandu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This code is valid only for current page ?
> WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
> WindowsImpersonationContext impersonatedUser = newId.Impersonate();
> After I impersonate current user and Response.Redirect to another page

there
> WindowsIdentity is changed to user before Impersonate.
> Is it normal ?
> How can I do to maintain Impersonation to all my pages ?
>
>



 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      08-12-2004
Have you investigated using impersonate=true in web.config?

--
Scott
http://www.OdeToCode.com

On Thu, 12 Aug 2004 16:16:45 +0300, "Sorin Sandu"
<(E-Mail Removed)> wrote:

>This code is valid only for current page ?
>WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
>WindowsImpersonationContext impersonatedUser = newId.Impersonate();
>After I impersonate current user and Response.Redirect to another page there
>WindowsIdentity is changed to user before Impersonate.
>Is it normal ?
>How can I do to maintain Impersonation to all my pages ?
>


 
Reply With Quote
 
Sorin Sandu
Guest
Posts: n/a
 
      08-13-2004
Yes I have impersonate=true
"Scott Allen" <bitmask@[nospam].fred.net> a scris Ón mesajul de
stiri:(E-Mail Removed).. .
> Have you investigated using impersonate=true in web.config?
>
> --
> Scott
> http://www.OdeToCode.com
>
> On Thu, 12 Aug 2004 16:16:45 +0300, "Sorin Sandu"
> <(E-Mail Removed)> wrote:
>
>>This code is valid only for current page ?
>>WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
>>WindowsImpersonationContext impersonatedUser = newId.Impersonate();
>>After I impersonate current user and Response.Redirect to another page
>>there
>>WindowsIdentity is changed to user before Impersonate.
>>Is it normal ?
>>How can I do to maintain Impersonation to all my pages ?
>>

>



 
Reply With Quote
 
Sorin Sandu
Guest
Posts: n/a
 
      08-13-2004
I am trying to impersonate the windows account in code like in
http://support.microsoft.com/default...b;en-us;306158 and then all
aspx pages to run on this new account (ACL is only for this account).
But after the first page when I impersonate it and I redirect to another
page the account reverse to original.
How can I do to maintain impersonation but in code not in web.config.


"Scott Allen" <bitmask@[nospam].fred.net> a scris Ón mesajul de
stiri:(E-Mail Removed).. .
> Have you investigated using impersonate=true in web.config?
>
> --
> Scott
> http://www.OdeToCode.com
>
> On Thu, 12 Aug 2004 16:16:45 +0300, "Sorin Sandu"
> <(E-Mail Removed)> wrote:
>
>>This code is valid only for current page ?
>>WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
>>WindowsImpersonationContext impersonatedUser = newId.Impersonate();
>>After I impersonate current user and Response.Redirect to another page
>>there
>>WindowsIdentity is changed to user before Impersonate.
>>Is it normal ?
>>How can I do to maintain Impersonation to all my pages ?
>>

>



 
Reply With Quote
 
ghinta ghinta is offline
Junior Member
Join Date: Aug 2007
Posts: 1
 
      08-29-2007
Hi guys seems an old 3d then....some1 got a resolution about it? i'm in the same problem, i do impersonate but when i do redirect i lost this impersonation....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WindowsImpersonationContext and DirectoryServices danycloutier@gmail.com ASP .Net Security 1 11-16-2006 04:10 PM



Advertisments