473,811 Members | 2,963 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 2448
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
2653
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, and they are showing access denied due to the ASPNET user of the local machine making the query. ...
12
2587
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. Consequently, the code in COM object runs under a local account and any code that needs to access...
2
1562
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 "System.IO.IOException: The file: U:\Downloads\ZTL0001 was not found. Can not upload the file to the FTP Site",...
2
2905
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 user programmatically, then switch it back afterwards. When I run the application on my local...
7
1375
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 said web application if I'm brutally honest with myself ;-) however it leaves me curious, as does...
2
1509
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
3318
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 failed for user '(null)'. Reason:
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 usually-not-network-user to reach it. I've checked my credentials in my remote session and it says it's
11
2857
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
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
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

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.