Impersonation in remote file server

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

Scott Allen

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

Guest

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

Scott Allen

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?
 
G

Guest

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

Scott Allen

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

Guest

Thanks Scott.

I also do think that it is impossible to view the files at client side.
 

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