473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ASPX accesses to network file resources

Hi,

I need an aspx's code behind program access to a network folder which is
only available for specific active directory user. How can I have that
specific aspx code login into the active directory with specific UID/PWD?

The rest of ASPX pages in the application don't need to have any access to
file resources.

Thank you,
Alan
Nov 19 '05 #1
4 1389
You can use impersonation. Check out this link:
http://msdn.microsoft.com/library/de...classtopic.asp

Shawn

"A.M-SG" <al******@newsgroup.nospam> wrote in message
news:OG*************@TK2MSFTNGP09.phx.gbl...
Hi,

I need an aspx's code behind program access to a network folder which is
only available for specific active directory user. How can I have that
specific aspx code login into the active directory with specific UID/PWD?

The rest of ASPX pages in the application don't need to have any access to
file resources.

Thank you,
Alan

Nov 19 '05 #2
Hi Alan,

Since the network share in your case only opened to specific AD users and
only one of your pages need to access it, I'm afraid we have to consider
using programmatic impersonation as Shawn has mentioned. Here is a kb
article which mentioned programmatically impersonate a certain account
(through clear username/password):

#How to implement impersonation in an ASP.NET application
http://support.microsoft.com/?id=306158

Hope helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Shawn" <bo********@hotmail.com>
| References: <OG*************@TK2MSFTNGP09.phx.gbl>
| Subject: Re: ASPX accesses to network file resources
| Date: Mon, 31 Oct 2005 19:50:51 +0100
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <#i**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 94.80-202-121.nextgentel.com 80.202.121.94
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135053
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| You can use impersonation. Check out this link:
|
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemsecurityprincipalwindowsimpersonationco ntextclasstopic.asp
|
| Shawn
|
| "A.M-SG" <al******@newsgroup.nospam> wrote in message
| news:OG*************@TK2MSFTNGP09.phx.gbl...
| Hi,
|
| I need an aspx's code behind program access to a network folder which is
| only available for specific active directory user. How can I have that
| specific aspx code login into the active directory with specific UID/PWD?
|
| The rest of ASPX pages in the application don't need to have any access to
| file resources.
|
| Thank you,
| Alan
|
|
|
|

Nov 19 '05 #3

Thank you Steven,
The article is exactly what I was looking for.
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:hH**************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

Since the network share in your case only opened to specific AD users and
only one of your pages need to access it, I'm afraid we have to consider
using programmatic impersonation as Shawn has mentioned. Here is a kb
article which mentioned programmatically impersonate a certain account
(through clear username/password):

#How to implement impersonation in an ASP.NET application
http://support.microsoft.com/?id=306158

Hope helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Shawn" <bo********@hotmail.com>
| References: <OG*************@TK2MSFTNGP09.phx.gbl>
| Subject: Re: ASPX accesses to network file resources
| Date: Mon, 31 Oct 2005 19:50:51 +0100
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <#i**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 94.80-202-121.nextgentel.com 80.202.121.94
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135053
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| You can use impersonation. Check out this link:
|
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemsecurityprincipalwindowsimpersonationco ntextclasstopic.asp
|
| Shawn
|
| "A.M-SG" <al******@newsgroup.nospam> wrote in message
| news:OG*************@TK2MSFTNGP09.phx.gbl...
| Hi,
|
| I need an aspx's code behind program access to a network folder which is
| only available for specific active directory user. How can I have that
| specific aspx code login into the active directory with specific
UID/PWD?
|
| The rest of ASPX pages in the application don't need to have any access
to
| file resources.
|
| Thank you,
| Alan
|
|
|
|

Nov 19 '05 #4
You're welcome Alan,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "A.M-SG" <al******@newsgroup.nospam>
| References: <OG*************@TK2MSFTNGP09.phx.gbl>
<#i**************@TK2MSFTNGP09.phx.gbl>
<hH**************@TK2MSFTNGXA01.phx.gbl>
| Subject: Re: ASPX accesses to network file resources
| Date: Tue, 1 Nov 2005 09:03:08 -0500
| Lines: 75
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <u9**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: toronto-hse-ppp3700327.sympatico.ca 65.95.109.92
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135226
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| Thank you Steven,
| The article is exactly what I was looking for.
|
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:hH**************@TK2MSFTNGXA01.phx.gbl...
| > Hi Alan,
| >
| > Since the network share in your case only opened to specific AD users
and
| > only one of your pages need to access it, I'm afraid we have to consider
| > using programmatic impersonation as Shawn has mentioned. Here is a kb
| > article which mentioned programmatically impersonate a certain account
| > (through clear username/password):
| >
| > #How to implement impersonation in an ASP.NET application
| > http://support.microsoft.com/?id=306158
| >
| > Hope helps.
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Shawn" <bo********@hotmail.com>
| > | References: <OG*************@TK2MSFTNGP09.phx.gbl>
| > | Subject: Re: ASPX accesses to network file resources
| > | Date: Mon, 31 Oct 2005 19:50:51 +0100
| > | Lines: 21
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | Message-ID: <#i**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 94.80-202-121.nextgentel.com 80.202.121.94
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:135053
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | You can use impersonation. Check out this link:
| > |
| >
http://msdn.microsoft.com/library/de...us/cpref/html/
| > frlrfsystemsecurityprincipalwindowsimpersonationco ntextclasstopic.asp
| > |
| > | Shawn
| > |
| > | "A.M-SG" <al******@newsgroup.nospam> wrote in message
| > | news:OG*************@TK2MSFTNGP09.phx.gbl...
| > | Hi,
| > |
| > | I need an aspx's code behind program access to a network folder which
is
| > | only available for specific active directory user. How can I have that
| > | specific aspx code login into the active directory with specific
| > UID/PWD?
| > |
| > | The rest of ASPX pages in the application don't need to have any
access
| > to
| > | file resources.
| > |
| > | Thank you,
| > | Alan
| > |
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
14
by: David W. Fenton | last post by:
I'm no stranger to this error message, but I have a client who is experiencing it, but, fortunately, without any actual data corruption, and it's driving them made. Their inability to grasp that...
3
by: Bonj | last post by:
I need to write a windows service, and the only way it can access a shared drive on a file server on the network is if the installer is put in "User" mode - "LocalService", "LocalSystem" and...
5
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to...
2
by: Mark Goldin | last post by:
Is it possible to access files on the network from an aspx page? I need to read a bunch of word docs. that are stored on the network. Thanks
2
by: Doug | last post by:
I've installed ASP.NET onto our web server (Win2k/unsure of IIS version) this morning. I created a simple ASPX page in Notepad that writes out an asp:Label control to the page and dynamically...
1
by: Daniel | last post by:
How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler? How to specify which account that aspx application should use when doing file IO from network paths?...
7
by: Ronald S. Cook | last post by:
In my .aspx page, I am trying to read file that is on a different on the company network. When I map a drive to it and call from within my .aspx page, I get this error:
4
by: accyboy1981 | last post by:
Hi, I'm looking to create a simple application that will copy files from a folder on one PC on the network to another PC on the network but I am having a bit of difficulty doing this. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.