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="bvasanth123, post: 4277795"] 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() Regards, Vasanth [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Security
Impersonate Thread with Domain ID in (ASP.NET)
Top