Take the 2-minute tour ×  I have a method that attempts to
update a sql server database in an ASP.NET application. If the
update fails, it catches the exception and then queues the
update in MSMQ, and then spins up a new thread that will later
de-queue the pending update and try again. When the thread
starts, it fails to open a database connection because it is
attempting to connect using Network Service as the login. The
sql connection is using Windows Authentication, and will work
outside of the thread. If I put a breakpoint in the code that
executes inside the new thread and check the
Thread.CurrentPrincipal, it shows the Identity as being the
correct user. Why is the sql connection attempting to be opened
by the Network Service account?  I can elaborate further is
necessary.   share|improve this question How are you starting
the new thread? –  Cocowalla Apr 7 '10 at 14:38 Thread thread =
new Thread(delegate); thread.Start(); –  Jonathan M Apr 7 '10 at
15:17 add comment  4 Answers  I think you need to chec