How to impersonate a specific user accessing to network shared directory?

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

From a ASP.Net application, I need to access to a remote shared
directory of a file server. Unfortunately, I must access to this file
server with a different user, not the user impersonated by the web
application.
I want that Directory.GetFiles() uses a specific user to access to the
shared directory.
Is it possible?

Thanks...
 
Hi Marco,

Move this specific aspx page to a sub directory and create a web.config
in the sub directory and override the impoersonate credentials of the
web application in the sub directory web.config file.

Hope this works.

Cheers,
Kris
 
Back
Top