Impersonation in remote file server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

How can I access files in remote file server through my ASP.NET application
only, but deny all other users? I have added
<identity impersonate="true"
userName="test"
password="123abc" />
in web.config, but I cannot browse the folder by browse button (i.e. <INPUT
type=file runat="server") when the folder just allow access by user test.

Anything else I should do?
Thanks a lot.
 
Hi Philip:

The impersonation setting will not help you here, because when the
user clicks the button to browse folders they will be contacting the
folder with thier browser and thier credentials directly - ASP.NET is
not involved at that point.
 
Thanks Scott.
I need to save the UNC path of files at file server. How can I involve
ASP.NET and impersonate to get the path?

Thanks again.
 
I suppose you could use stuff from System.IO like the Directory and
File classes to provide a list of directories in an ASP.NET page, like
in a DataGrid. Those requests to list directories would come from
ASP.NET and the server. Would that be helpful?
 
Thanks again.

I try use System.IO to browse files. I can get all logical drives and
folders and pass credential successfully. However, I can just browse files in
web server or servers at same network, can I browse files at client side or
servers at same network with clients but not web server? It is because I
would like just save the hyperlink of files at client side. Is it possible?

Thanks.
 
Thanks again.

I try use System.IO to browse files. I can get all logical drives and
folders and pass credential successfully. However, I can just browse files in
web server or servers at same network, can I browse files at client side or
servers at same network with clients but not web server? It is because I
would like just save the hyperlink of files at client side. Is it possible?


I'm not quite sure I follow the question, but you won't be able to
browse files on the client machine from the server. You could send
links to files you find down to the server.
 
Back
Top