473,574 Members | 18,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="tr ue"
userName="test"
password="123ab c" />
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 2435
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*******@disc ussions.microso ft.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="tr ue"
userName="test"
password="123ab c" />
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*******@disc ussions.microso ft.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="tr ue"
userName="test"
password="123ab c" />
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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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="tr ue"
> userName="test"
> password="123ab c" />
>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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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="tr ue"
> userName="test"
> password="123ab c" />
>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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2646
by: CJ | last post by:
Hi anyone. Does anyone know of issues regarding impersonation in VB .NET with regards to accessing remote WMI information? I have a wrapper class which encapsulates various WMI calls, this appeared fine under .net 1.1, but since sp1 it appears to not work. I have switched on the debug level to 2 (for WMI) on the machines i am querying,...
12
2553
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The problem is that even when it is configured to run under a certain identity through Web.config, the impersonation is not carried through to COM library....
2
1553
by: Beamer310 | last post by:
I really need help with this. I pass an xml string to a web service that sits on a remote machine. Part of the process is to read the xml and move relevant files from a shared computer to an ftp server. This works fine when I test it on my computer, but when I reference the source document that is on another machine I get...
2
2889
by: Jon L. Lovesky | last post by:
Hello all, I am attempting to access a remote folder from an asp.net application (all within the same domain). The application is configured for windows authentication in IIS and the asp.net worker process runs as the local ASP.NET account. When the application is about to access the remote folder I switch the security context to the remote...
7
1355
by: Bonj | last post by:
Hi I made a naff web application which uses the impersonation method in MSDN (can't find it now, but it basically revolves around creating a token by calling the LogonUser API, calling DuplicateToken API on it, and then calling w.Impersonate() where w is a System.Security.Principal.WindowsIdentity object). This is the only real point of the...
2
1490
by: Sharon | last post by:
Hi to all. I have two Impersonation problems: 1. When using my app. from a remote computer, the aspx page is unable to get information from Active Directory. I am using Impersonation, and the Impersonated user is logged to the domain. When I'm doing the same, logged as the same user, but on the server computer, it works.
15
3298
by: Patrick | last post by:
I set my web.config as follows: <authentication mode="Windows" /> <identity impersonate="true" /> Logon to my ASP.NET website as a user who can authenticate to the target database. 1) Works fine on my local PC running IIS5.1 on WinXP Pro SP1 2) does not work on IIS6.0 on Windows 2003 server: System.Data.SqlClient.SqlException: Login...
26
870
by: andrew_webby at hotmail | last post by:
Hi Am having a problem with an app I wrote to test patch delivery. I contact a remote PC, and get it to run a patch which is installed on a server. It works fine if I use psexec for example and I know it's not NTFS/share-level security at fault - it's readable to everyone which is usually enough for scheduler or any other...
11
2841
by: Phil | last post by:
Hi, I've currently setup a local user as described in: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnne...
0
7738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8081
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6486
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5325
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3759
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3777
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2255
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1360
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1084
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.