ASPX accesses to network file resources

A

A.M-SG

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
 
S

Shawn

You can use impersonation. Check out this link:
http://msdn.microsoft.com/library/d...ipalwindowsimpersonationcontextclasstopic.asp

Shawn

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
 
S

Steven Cheng[MSFT]

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" <[email protected]>
| References: <[email protected]>
| 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: <#[email protected]>
| 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!TK2MSFTNGP09.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/default.asp?url=/library/en-us/cpref/html/
frlrfsystemsecurityprincipalwindowsimpersonationcontextclasstopic.asp
|
| Shawn
|
| | 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
|
|
|
|
 
S

Steven Cheng[MSFT]

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" <[email protected]>
| References: <[email protected]>
<#[email protected]>
<[email protected]>
| 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: <[email protected]>
| 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!TK2MSFTNGP10.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.
|
|
| | > 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" <[email protected]>
| > | References: <[email protected]>
| > | 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: <#[email protected]>
| > | 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!TK2MSFTNGP09.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/default.asp?url=/library/en-us/cpref/html/
| > frlrfsystemsecurityprincipalwindowsimpersonationcontextclasstopic.asp
| > |
| > | Shawn
| > |
| > | | > | 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
| > |
| > |
| > |
| > |
| >
|
|
|
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top