Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi!
I want to copy file following address to my server.
I want to copy this file and save in my folder on server.

http:\\192.168.1.107\RecFolder\2012-09-14 04-29-24 Line 4.UP2

this path gives error.

URI format not supported.
Posted
Comments
Sergey Alexandrovich Kryukov 8-Oct-12 2:31am    
What is not clear in this error?
--SA

1 solution

Such URIs are not supported by this function. It works only for the file systems mounted on the local computer. The files themselves could be on some other computer, if they are in the directory shared for the network users using file sharing protocols and this directory is mounted on a client computer. Other kinds of protocols (like HTTP, FTP and so on) are not supported.

To down load a file exposed via HTTP, you can use the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

For one sample showing how to download, you can use my application HttpDownloaded posted here:
how to download a file from internet[^].

See also my past answer:
how to download a file from the server in Asp.net 2.0[^].

—SA
 
Share this answer
 

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