473,473 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

impersonate in new thread


My ASP.NET application sets up impersonate in the config file:

<identity impersonate="true" userName="m1\aspuser" password="xyz" /
>
Later, within my application, I create a thread:

x= New processor
Dim ts As New ThreadStart(AddressOf x.start)
Dim thread As New Thread(ts)
thread.Start()

I suspect this thread does not have the same security context as the
thread that started it (the ASP.NET thread). How do I set up this
thread to have the same security context as the main thread?

Feb 22 '07 #1
2 1894
On Feb 22, 8:15 am, "phil" <pbei...@gmail.comwrote:
My ASP.NET application sets up impersonate in the config file:

<identity impersonate="true" userName="m1\aspuser" password="xyz" /

Later, within my application, I create a thread:

x= New processor
Dim ts As New ThreadStart(AddressOf x.start)
Dim thread As New Thread(ts)
thread.Start()

I suspect this thread does not have the same security context as the
thread that started it (the ASP.NET thread). How do I set up this
thread to have the same security context as the main thread?

How do I set the new thread principal?
http://groups.google.com/group/micro...284fe91ce059c4

And you may find this useful
How can I retain impersonation in the new thread created from ASP.NET
application?
http://channel9.msdn.com/wiki/defaul...ecurityFAQ0066

Feb 22 '07 #2
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@k78g2000cwa.googlegr oups.com...
On Feb 22, 8:15 am, "phil" <pbei...@gmail.comwrote:
>My ASP.NET application sets up impersonate in the config file:

<identity impersonate="true" userName="m1\aspuser" password="xyz" /

Later, within my application, I create a thread:

x= New processor
Dim ts As New ThreadStart(AddressOf x.start)
Dim thread As New Thread(ts)
thread.Start()
I hope you're also aware that your new thread may continue execution after
the request has completed? This means that it should not reference any part
of the page.

John
Feb 22 '07 #3

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

Similar topics

1
by: Sorin Sandu | last post by:
I am trying to impersonate the windows account in code like in http://support.microsoft.com/default.aspx?scid=kb;en-us;306158 and then all aspx pages to run on this new account (ACL on files is...
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: José Achig | last post by:
Hi all, I have written a windows service in vc++ .net with "SystemAccount" rights and I want to get access to the user's desktop so I have heard that I have to impersonate the user when it...
0
by: steven | last post by:
I have an asp.net webapp running on W2K server with .net framework 1.1 The intranet-app supports 2 languages: dutch (fallback language) and french. The choice is made with 'Request.UserLanguages'...
3
by: Viorel Ghilas | last post by:
Hi all I have an ASP.NET application that uses impersonate account to connect to DB, this works good. But in some cases I need to put some methods in ThreadPool. The methods from ThreadPool...
3
by: Steven Berkovitz | last post by:
Hi there, I am having a very odd problem with localization. I have a web app with 2 embedded resources files - 1 neutral .resx file and 1 for fr-CA. With <identity impersonate="true" /> the...
6
by: richi | last post by:
Hi... Okay this is driving me mad. I have a very simple webpage served up from my webserver which uses the following code to populate 3 labels. lblOne.Text = Page.User.Identity.Name...
0
by: bvasanth123 | last post by:
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....
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.