.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Specifying user account to run a Thread
 

Specifying user account to run a Thread

Hi,

I want to start some asynchronous operations in a thread and I want the new thread to run under a specific user account. Is it possible to achieve this in threading and how?

Thanks,
Prakash
PrakashV

Hello Prakash,

The type of functionality I believe you are looking for is called 'impersonation'. Effectively, you want your code to impersonate another identity or role during some portion of execution. Impersonation happens at the thread level.

You can find more API documentation and descriptions regarding impersonation and the .NET Framework at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconImpersonatingReverting.asp

 

Hope that helps,

Stephen Fisher [Microsoft Common Language Runtime: Security - Developer]

http://blogs.msdn.com/stfisher

Stephen Fisher - MSFT

Hello Prakash,

The type of functionality I believe you are looking for is called 'impersonation'. Effectively, you want your code to impersonate another identity or role during some portion of execution. Impersonation happens at the thread level.

You can find more API documentation and descriptions regarding impersonation and the .NET Framework at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconImpersonatingReverting.asp

 

Hope that helps,

Stephen Fisher [Microsoft Common Language Runtime: Security - Developer]

http://blogs.msdn.com/stfisher

Stephen Fisher - MSFT

You can use google to search for other answers

Custom Search

More Threads

• reading directories and uploading without system.io
• ReaderWriterLock
• How to add a domain user to local remote desktop users group using C#.
• BackgroundWorker problems
• USB Classes for basic communication
• Get Word
• convertion :-Invalid cast from 'System.Int32' to 'System.Guid'
• Why can I still serialize an object which is not marked as Serializable?
• Encrypt in SQL and decrypt in C#
• Where is installpagepersonalization.sql ?