3

ie

static void Main(string[] args)
{
    var thread = new Thread(WhoAmI);
    thread.Start();
}

static void WhoAmI()
{ 
    //can i access network resources as the user who ran Main?
}
Noel Kennedy
  • 12,128
  • 3
  • 40
  • 57

3 Answers3

3

Yes, they do.

// So yes, you can.
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
3

Threads don't have identity, processes do. So yes.

Edit: As Michael points out, it is possible for a thread's execution context to impersonate a user other than the one that owns the current process. But this will not happen unless you do it explicitly.

John Knoeller
  • 33,512
  • 4
  • 61
  • 92
1

Yes. In fact, it would take some effort to make the Thread able to access resources as a different user.

mob
  • 117,087
  • 18
  • 149
  • 283