I have a service that is hosted in SharePoint. What I want to do is to access file system in the service, say create directories and files on the server (Web front end server). The current logged in user does not have permission on the file system and I don't want to give them permission.
What I am looking for is to do
System.IO operations under application pool account. something like SharePoint's
RunWithElevatedPrivileges but for IO operations. More specifically it is
System.IO.Directory.CreateDirectory(string) and also
Is there a way to elevate privileges for these sorts of operations?