PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

How to access a network share and read directory info in aspnet c#

 
 
Christian from France
Guest
Posts: n/a
 
      12th Aug 2008
I want to write an aspnet aspx page

This page :
1 - Connect to a net share
\\server\c$ with credentials: user/password

2 - Read Directory info of this share

3 - Write these infos in the page

Is anobody as a sample to do that ?

Thanks a lot,

Christian
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      12th Aug 2008
The System.IO class has everything you need.

You will, however, need to impersonate the account ASP.NET is running as,
as a network account which has permission to access the network share.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Christian from France" <(E-Mail Removed)> wrote in message
news:10C4CCA9-EAD3-4856-BC6F-(E-Mail Removed)...
>I want to write an aspnet aspx page
>
> This page :
> 1 - Connect to a net share
> \\server\c$ with credentials: user/password
>
> 2 - Read Directory info of this share
>
> 3 - Write these infos in the page
>
> Is anobody as a sample to do that ?
>
> Thanks a lot,
>
> Christian



 
Reply With Quote
 
Christian from France
Guest
Posts: n/a
 
      13th Aug 2008
I found api to access to a local directory information but not to access to a
remote network share providing credentials (user/password).
How can i connect to a net share \\fileserver\c$ with credentials
(user/password) ?
(fileserver is not my asp.net server but another host in my local network)

Christian

"Juan T. Llibre" wrote:

> The System.IO class has everything you need.
>
> You will, however, need to impersonate the account ASP.NET is running as,
> as a network account which has permission to access the network share.
>
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "Christian from France" <(E-Mail Removed)> wrote in message
> news:10C4CCA9-EAD3-4856-BC6F-(E-Mail Removed)...
> >I want to write an aspnet aspx page
> >
> > This page :
> > 1 - Connect to a net share
> > \\server\c$ with credentials: user/password
> >
> > 2 - Read Directory info of this share
> >
> > 3 - Write these infos in the page
> >
> > Is anobody as a sample to do that ?
> >
> > Thanks a lot,
> >
> > Christian

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Program Files Directory on Network Share Wayne Wengert Windows XP General 6 13th Feb 2006 09:56 PM
Only ASPNET Process should access a directory =?Utf-8?B?dGhlIGZyaWVuZGx5IGRpc3BsYXkgbmFtZQ==?= Microsoft ASP .NET 0 16th Dec 2005 12:14 PM
RE: ASPNET access to directory denied Jim Cheshire [MSFT] Microsoft ASP .NET 0 27th Jul 2004 10:36 PM
Help - directory access for ASPNET user =?Utf-8?B?SGFyaQ==?= Microsoft ASP .NET 2 15th Apr 2004 02:56 AM
ASPNET Account Security Problem - Running a Web Application over a network share CES Microsoft ASP .NET 1 11th Oct 2003 12:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:36 PM.