Temporarily removing impersonation
I'm using the following code to impersonate a different user. http://www.codeproject.com/KB/cs/zetaimpersonator.aspx
The problem is that I also need to call a local executable. When attempting to access the .exe I'm getting the error "Access Denied". I've tried adding the impersonated user to the file permissions but that didn't appear to work.
So my question, is there an easy way to break out of the impersonat开发者_StackOverflow中文版ed user and come back in?
I'm open to other suggestions as well.
I had to add the impersonated user under the Admin group. I dont like it, but its fixed.
精彩评论