Okay so there a few examples around, but they are really long winded and confusing
Basically I want to upload a file lets say test.txt from my application to my webserver, i have the PHP to handle the post already,
Is there a quick and easy way to do this?
Ive tried using:
WebClient client = new WebClient();
string myFile = @"C:\Draft_3.txt";
client.Credentials = CredentialCache.DefaultCredentials;
client.UploadFile(@"http://myweb.com/projects/idl/Draft Results/RK/myFile", "PUT", myFile);
client.Dispose();
but it gives me a "A first chance exception of type 'System.Net.WebException'
occurred in System.dll" runtime error when running that code is there something i am missing?