views:

20

answers:

1

I have in my web.config, is there any way to programmatically "unimpersonate"? There is just one or two little places where I need to not be impersonating... is this possible?

+1  A: 

The only way I'm aware of is to call the Win32 RevertToSelf function, do what you need to do outside impersonation, then reinstate your previous identity once you're done.

Tim Robinson
I was afraid of that.
Max Schmeling