I’m using impersonation on my web application in order to identify who is currently logged onto the client. For example “John Smith”. This side of things works fine as the web page lists the name and email address of whoever is logged onto the machine.
My web.config file contains…
I have a folder on the company network and when a user submits a request on my web page, a sub folder gets created. There is an AD security group setup for this folder and “John Smith” has access to it.
When I run the code from my PC in debug mode all works fine and the sub folder gets created as it should. My problem comes when I release the application to the Intranet server. When I run the web page as “John Smith” from the Intranet, I get the error:
Error: Access to the path is denied.
I’m running this via IIS v 6 (I know, it’s an old server!).
The application pool identity is set to “Network Service” and I have added Network Service to the folder permissions with modify access.
Am I missing something or is there another account that it would use which requires access to the folder? I’ve also tried the ASP.NET account with no success.