Getting the Current username when impersonated

后端 未结 4 1679
说谎
说谎 2020-12-05 11:49

I am using something like the following method to impersonate a user in my code:

How do you do Impersonation in .NET?

In another class, I need to find out th

4条回答
  •  旧巷少年郎
    2020-12-05 12:09

    According to example at http://msdn.microsoft.com/en-us/library/chf6fbt4.aspx the current identity changes during impersonation. Are you sure your code is inside the impersonated code block?

提交回复
热议问题