Listing files on network share

  • Thread starter Thread starter medvitz
  • Start date Start date
M

medvitz

I'm writing an ASP.NET application that requires that a list of files from
a network shre be displayed on the site. We are using windows integrated
authorizations and impersonation. Whenever I try to access the network
share I get the following error.

DirectoryNotFoundException saying "Could not find a part of the path
"\\server\share"

In looking to solve this, I have come across multiple items discussing the
double hop authentication issue, which describes seting up and using
delegation. I have tried this, whith no luck ( as an aside, the same
assembly accesses AD without issue ).

Any help, Tips, or pointers would be greatly appreciated

Dave
 
If delegation isn't working in your environment, there are at least
two other options:

One solution is to run the ASPNET worker process under a domain
account (by modifying the processModel element in machine.config.

Another solution is to use <identity impersonate="true"
userName=">domain>\<account>" password="<password>"/>. This
impersonates with a fresh set of credentials that can make another
network hop.

HTH,
 
Back
Top