Accessing network shares through ASP.Net
- by jkrebsbach
In my impersonation enabled web site I needed to access files on a network share. Running locally, everything worked fine.
After deploying out to the dev server and hitting the web site from my PC, things fell apart.
With impersonation enabled, we can access files on the server itself, but a network share is another story.
Accessing a share on another server, we encounter the infamous "double hop" situation, were the credentials have already been digested on the web server and are not available for the file server.
We need to either expose the shared files to the identity IIS is running under, or create a new impersonation context.