Click here to Skip to main content
11,496,146 members (560 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: C# ASP.NET
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 7-Oct-12 21:01pm
Comments
Sergey Alexandrovich Kryukov at 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
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100