473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

WindowsImpersonationContext

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 ?
Nov 18 '05 #1
4 3481
tma
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" <ss****@yahoo.com.del> wrote in message
news:Og**************@TK2MSFTNGP10.phx.gbl...
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 ?

Nov 18 '05 #2
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"
<ss****@yahoo.com.del> 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 ?


Nov 18 '05 #3
Yes I have impersonate=true
"Scott Allen" <bitmask@[nospam].fred.net> a scris în mesajul de
stiri:c4********************************@4ax.com.. .
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"
<ss****@yahoo.com.del> 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 ?

Nov 18 '05 #4
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:c4********************************@4ax.com.. .
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"
<ss****@yahoo.com.del> 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 ?

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jake | last post by:
I am having a problem impersonating the current web user to run a search of active directory to verify if the user is a member of an active directory group. The following code works fine on my...
8
by: BLiTZWiNG | last post by:
After playing with the code shown and utilising Willy Denyottes' help, I have come to the conclusion that there is some form of difference between the managed WindowsIdentity.Impersonate() over the...
4
by: Heliotic | last post by:
Hi everyone, Currently I am working on an application that will perform a remote scan of a specified server using the following code: Type t = Type.GetTypeFromProgID(...
6
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need...
11
by: Eric | last post by:
Hello, I have a web app that uploads files to a file server (different box than the web server). The application uses NT integrated authentication, but no users should have permissions to the...
1
by: Bala | last post by:
Hi I am using below code for impersonating. Previosualy it was working fine. Now its giving this error message. any idea how to resolve this. LogonUser failed with error code : 87 thanks...
7
by: John.NET | last post by:
Hi, First please forgive that this is a repost as the first time I didn't have my proper nospam email configured... I'm writing a web service where one method will launch another .NET program...
2
by: KaNos | last post by:
Hello world, I've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows...
5
by: Morten Wennevik | last post by:
Hi, I apologize for the extensive cross-posting but I'm getting desparate. We have a web page calling one or another web service. Both web service communicate with Sharepoint 2003, and both...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.