hi all,
How tp send a file to any website using http protocol in vb.net windows application
Thanks,
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 May 27, 2011, 8:25 AM
As Jagan if you have user name & password then you can the file to the sites.
For this you have to use webclient and use upload method.
string uriString = "http://yoursitename.com";
WebClient myWebClient = new WebClient();
string UploadData = "Read the file /data here";
myWebClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
byte[] byteArray = Encoding.ASCII.GetBytes(UploadData);
byte[] responseArray = myWebClient.UploadData(uriString, "POST", byteArray);
MessageBox.Show(Encoding.ASCII.GetString(responseArray));
Hope this helps you.
Jaganathan BantheswaranPosted May 27, 2011, 7:39 AM
Do you have all the credentials for accessing the web? Then we can !.