Re: Simple thread issue?
- From: bruce barker <nospam@xxxxxxxxxx>
- Date: Mon, 05 Feb 2007 09:24:01 -0800
when you create a thread, its identity is the process identity, not the starting threads identity, so it will not match the pool account or impersonation account. the the case of asp.net, its the id of the worker process usually a network service account.
you need to pass the desired identity to the new thread and have the new thread impersonate it.
-- bruce (sqlwork.com)
Brian wrote:
I have an file based asp.net application the creates a thread to do some background printing. It works fine but when the application is deployed on a web server, the following error occurs in the thread when it accesses SQL:.
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Note the blank user. It seems that the new thread does not have the credentials but looking at "Thread.CurrentPrincipal", there is a valid user (me).
Is there something I am missing? Does the application need some assembly permissions? I wonder if there are any settings under IIS? Is there any way of telling why SQL cannot access the thread credentials?
Brian
- Follow-Ups:
- Re: Simple thread issue?
- From: Brian
- Re: Simple thread issue?
- References:
- Simple thread issue?
- From: Brian
- Simple thread issue?
- Prev by Date: Re: ASP.Net 2.0 Webservice and IP adress
- Next by Date: Re: ASP.Net 2.0 Webservice and IP adress
- Previous by thread: Re: Simple thread issue?
- Next by thread: Re: Simple thread issue?
- Index(es):
Relevant Pages
|