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

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...
 
K

krishna.bitla

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top