Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 20:01pm
Comments
Sergey Alexandrovich Kryukov at 8-Oct-12 2:31am
   
What is not clear in this error?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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 OriginalGriff 389
1 Sergey Alexandrovich Kryukov 362
2 CPallini 130
3 Abdul Samad KP 125
4 Richard MacCutchan 110
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,680
2 CPallini 4,850
3 George Jonsson 3,454
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2014
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