Hello jyjohnson,
i assume that you first impersonate and start the thread afterwards....
impersonation tokens are not copied to new threads in .net 1.1 (they will
in 2.0)
do it like this
start the thread
impersonate the user on the new thread
something like (only compiled in the newsreader
Worker worker = new Worker();
worker.user = Page.User;
Thread t = new Thread(new ThreadStart(worker.DoWork);
class Worker
{
public WindowsPrincipal user;
public void DoWork()
{
WindowsImpersonationContext ctx;
try
{
user.Impersonate();
}
finally
{
ctx.Undo();
}
}
}
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> My asp.net application needs to allow the user (via basic
> authentication) to execute a long running process (new thread) that
> writes files out to a share on another server.
>
> This works if I just use impersonation without creating a new thread.
> I'm using XP Pro + IIS 5. I think I have access to a Win 2003 server
> if that makes things easier.
>
> Thanks....
>