need to upload the files based on the ip address......
i need some tips to proceed
thanks in advance
Uploading files using ip address
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted Jun 7, 2011, 3:39 AM EDT
In the remote IP system , if the folder is mapped properly then you can upload the file by using the below code snippet.
http://msdn.microsoft.com/en-us/library/36s52zhs.aspx#Y1370
Console.Write("\nPlease enter the URI to post data to : ");
String uriString = Console.ReadLine();
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
Console.WriteLine("\nPlease enter the fully qualified path of the file to be uploaded to the URI");
string fileName = Console.ReadLine();
Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
// Upload the file to the URI.
// The 'UploadFile(uriString,fileName)' method implicitly uses HTTP POST method.
byte[] responseArray = myWebClient.UploadFile(uriString,fileName);
// Decode and display the response.
Console.WriteLine("\nResponse Received.The contents of the file uploaded are:\n{0}",
System.Text.Encoding.ASCII.GetString(responseArray));
Gowtham manju157 reputationPosted Jun 7, 2011, 3:51 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jun 7, 2011, 11:36 AM EDT