469,332 Members | 6,612 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

Impersonation in remote file server

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.
Nov 19 '05 #1
6 2201
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 6 Jun 2005 18:54:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.


Nov 19 '05 #2
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.

"Scott Allen" wrote:
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 6 Jun 2005 18:54:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.


Nov 19 '05 #3
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?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 7 Jun 2005 07:47:17 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.

"Scott Allen" wrote:
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 6 Jun 2005 18:54:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
>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.



Nov 19 '05 #4
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.

"Scott Allen" wrote:
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?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 7 Jun 2005 07:47:17 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.

"Scott Allen" wrote:
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 6 Jun 2005 18:54:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:

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


Nov 19 '05 #5
On Wed, 8 Jun 2005 20:38:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 19 '05 #6
Thanks Scott.

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

"Scott Allen" wrote:
On Wed, 8 Jun 2005 20:38:02 -0700, "Philip Lee"
<Ph*******@discussions.microsoft.com> wrote:
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CJ | last post: by
2 posts views Thread by Beamer310 | last post: by
2 posts views Thread by Jon L. Lovesky | last post: by
7 posts views Thread by Bonj | last post: by
2 posts views Thread by Sharon | last post: by
26 posts views Thread by andrew_webby at hotmail | last post: by
11 posts views Thread by Phil | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.