4

I can map a network share point to a local logical drive by using net.exe like this:

net use J: \\cnf001\test\folder1 /user: ...

I build a C# lib to use Process to simulate the mapping. Now I have a case I need to map: a share point in "My Computer"->"My Network Places"->[share node], where "share node" is in the format https://...

I cannot use net.exe any more, or I am not sure what parameters I can use if possible? Anyway, is it possible to build map drive for this case? How? Do I need some other tools

David.Chu.ca
  • 5,165
  • My client has a https://.. share point available with user name and pwd. What I need to do is to put a text file there in a folder. I guess I need to build a map drive first, then use System.IO to output file there. –  Jul 20 '09 at 16:31
  • I guess I cannot use net.exe but I can use ftp to transfer the file. Any information about its parameters to send file to a host so that I can invoke the process in C#? –  Jul 20 '09 at 16:45

3 Answers3

4

You can do this if the server at the HTTP(s) supports WebDAV. WebDAV is available on most web platforms so it shouldn't be an issue to enable it.

http://en.wikipedia.org/wiki/WebDAV

  • The question is about the client, not the server. – doekman Aug 27 '09 at 13:52
  • This is an answer about the client as well. WebDAV is a widely supported protocol for just this type of stuff; mounting and accessing a file system via HTTP. – Nissan Fan Oct 06 '09 at 17:29
0

On windows, you need a third party tool. For example DriveOnWeb. I used an OEM version, which only works with my ISP, but it works great.

doekman
  • 301
0

You can check the following article: Reading contents of Web Folders in C#. In a nutshell, the folders in My Network Places are just file system shortcuts located in Documents and Settings\$USER$\NetHood (XP) / Users\$USER$\AppData\Roaming\Microsoft\Windows\Network Shortcuts (Vista).

And regarding your comment on using FTP - you can use System.Net.FtpWebRequest class or System.Net.WebClient class.