I am using impersonation in an application in IIS. I need to write a file to the file system, but don't want to use the impersonated user's credentials in this one case. I need to use the credentials of the app pool.
How do I temporarially elevate a worker process' credentials from impersonated credentials to the app pool's credentials?