Hi, I guess you are impersonating..?
when impersonation is on - the current thread impersonates you managed identity. when you spawn a new thread, this thread is not impersonating by default - so you run under the credentials of the process. search for "WindowsImpersonationContext" in .NET SDK Documentation. bye dominick -----Urspr�ngliche Nachricht----- Von: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Im Auftrag von Julie Gesendet: Dienstag, 26. August 2003 17:27 An: [EMAIL PROTECTED] Betreff: [ADVANCED-DOTNET] Security Permissions on a new thread (C#) I have a web program that spawns a new thread as follows: Thread t = new Thread(new ThreadStart(ProcessFileThreadOperation)); t.Start(); The thread itself starts a long process where it begins by opening a file, then does alot of processing on this file, and once it is done, it e-mails the resulting file to someone. Now if I remove the thread altogether by changing the previous 2 lines to simply call the function : ProcessFileThreadOperation(); then everything works... but I don't get a separate thread, and hence I have to wait for this process to return before the user can do anything else... But when it is part of a thread, it fails to open the file, I get an error stating that "Error: Logon failure: unknown user name or bad password." as if my credentials were no good on this new thread. This may seem trivial, but I've been researching all over the place to see how I can solve this problem, and nothing has come up... It works fine as long as it is on my computer, but that's probably because my security is a bit more flexible, however once it is loaded at my web host, it no longer works. Any suggestions out there? Thanks, Julie =================================== This list is hosted by DevelopMentor� http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
