Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Security
Impersonate Thread with Domain ID in (ASP.NET)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Paul Clement, post: 4277796"] On 5 Jul 2005 14:51:14 -0700, [email]bvasanth123@rediffmail.com[/email] wrote: ¤ Hi ¤ I am running the ASP.NET web application which is running under domain ¤ id USER1. My OS is XP. I had added the following location tag in ¤ machine.config to make my application run under USER1. ¤ </location> ¤ <location path="Default Web Site/WebApplication1"> ¤ <system.web> ¤ <identity impersonate="true" ¤ userName="mydomain\USER1" ¤ password="mypassword"/> ¤ </system.web> ¤ </location> ¤ ¤ ¤ In aspx page, I am displaying windows identity, which displays ¤ mydomain\USER1 as expected. ¤ When I start a new thread from aspx page, thread does not assume anu ¤ identity. I would like to run the new thread under same identity (i.ed ¤ mydomain\USER1). How can I do this impersonation on the thread?. I ¤ tried impersonate() method (see code below), and got error "unable to ¤ impersonate". (variable global.ApplicationIdentity is mydomain\USER1). ¤ Please help ¤ Dim newprin As WindowsPrincipal = New ¤ WindowsPrincipal(Global.ApplicationIdentity) ¤ Thread.CurrentPrincipal = newprin ¤ ¤ ¤ Dim wi As WindowsImpersonationContext = ¤ Global.ApplicationIdentity.Impersonate() ¤ ¤ ¤ TryFileAccess() ¤ wi.Undo() See if the following helps: A System.Security.SecurityException exception occurs when you try to impersonate a user from a secondary thread in an ASP.NET Web application [URL]http://support.microsoft.com/default.aspx?scid=kb;en-us;842790[/URL] Paul ~~~~ Microsoft MVP (Visual Basic) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Security
Impersonate Thread with Domain ID in (ASP.NET)
Top