Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Can anybody help me out in developing C# apllication to access content of a folder that is residing on another PC with different credential. These two PC's are Connected through LAN. So, I need an apllication that access a remote PC folder.

Thanks in advance.:)
Posted
Updated 2-Apr-13 19:35pm
v2

You have to look for "Impersonation". See e.g. A complete Impersonation Demo in C#.NET[^] for an example.
 
Share this answer
 
If by "remote PC folder" you simply mean the shared folder, for the user it's no different from a local directory. You don't need any "application", you just write the code using System.IO.

Another option is to install/run an FTP server on a remote host. For a client-part code, all you need to use is the class System.Net.FtpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[^].

—SA
 
Share this answer
 
Comments
Vinod KUmar S N 3-Apr-13 1:39am    
Thanks Alexandrovich. But, I also need to access the folders using credential, if that folder is not shared.
Sergey Alexandrovich Kryukov 3-Apr-13 13:26pm    
If the folder is not shared and not served up with FTP is some other protocol and service, you don't have access to is. If you need to use credentials, use them.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900