I have web application that have to access local resources, files/folders, to be able to do git clone/pull/push. I\'ve created a separate Application Pool with Process Identity
If already not having it, try setting:
in web.config
EDIT
I was wrong, you need to have your app pool identity with access to local folder here:
System.Security.Principal.WindowsIdentity.GetCurrent()
EDIT 2
I have found solution. To run application AS you, you need to turn on impersonation after all (app pool setting does not apply on my IIS7.5), but AS A SPECIFIC USER. So, to enable this, you need to turn impersonation on in web.config AND specify user:
You can also set this through inetmgr:
Either way, after setting this,
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
gives:
C:\Users\obrad\AppData\Local
Another update:
I have been searching for a way to do the same without putting my password in web.config, and can confirm that I get local user folder also when basic impersonation is on
But under condition that application connects (under app settings -> Connect as...) as me: