Bruce,
Saw your reply to DS but didn't see how to actually set the security
context of the created thread. I am having the exact same problem as
DS -- can't access objects in a child thread that I can in the parent
thread.
How do I programmatically set the security context ofthe child thread
to that of the parent? Please send answer to
dwernli@evitechnology.com. Thanks loads.
Thanks,
Dave Wernli
dwernli@evitechnology.com
(540)845-1225
Bruce Barker wrote:[color=blue]
> when you start a thread, it runs under the default process security context,
> not that of the creating thread. you will need to have the new thread
> impersonate the security of the creating thread. also new thread will not be
> associated the correct httpcontext, so if you need it, pass it.
>
>
> -- bruce (sqlwork.com)
>
>
> "DS" <DS@discussions.microsoft.com> wrote in message
> news:4ECEB799-3AAF-4351-89C2-250C17AD7524@microsoft.com...[color=green]
> >I try to generate a excel workbook using Excel object in ASP.NET program.
> > When I implement the Excel workbook generation with out a thread it works
> > fine. When I wrap all the excel generation process inside a method, and
> > spin
> > this method in a different thread I get the following error:
> >
> > "An unhandled exception of type 'System.UnauthorizedAccessException'
> > occurred in Unknown Module.
> > Additional information: Access is denied."
> >
> > I am stuck with this. Waiting for comments & suggestions on how to
> > generate
> > a Excel work book in a different thread.
> >
> > Thanks in advance.
> > DS[/color][/color]