need to upload the files based on the ip address......
i need some tips to proceed
thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jun 7, 2011, 7:39 AM
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));
Sam HobbsPosted Jun 7, 2011, 3:36 PM
Gowtham manjuPosted Jun 7, 2011, 7:51 AM