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

  • Thread starter Christian from France
  • Start date
C

Christian from France

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
 
J

Juan T. Llibre

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.
 
C

Christian from France

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
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top