405 error on put

  • Thread starter Thread starter rkmoray
  • Start date Start date
R

rkmoray

I am trying to upload a pdf file to a web server. The server is local
right now for testing.
I am running xp, iis5

I get a 405 error on the post, please help.

String uriString = "http://localhost/PineNet/";
WebClient myWebClient = new WebClient();
string fileName = txtFilename.Text;
byte[] responseArray =
myWebClient.UploadFile(uriString,"POST",fileName);
 
Try to POST to a page rather than to a directory (String
uriString=http://localhost/PineNet/SomePage.aspx)

Patrice

--

rkmoray said:
I am trying to upload a pdf file to a web server. The server is local
right now for testing.
I am running xp, iis5

I get a 405 error on the post, please help.

String uriString = "http://localhost/PineNet/";
WebClient myWebClient = new WebClient();
string fileName = txtFilename.Text;
byte[] responseArray =
myWebClient.UploadFile(uriString,"POST",fileName);
 
I added blank.aspx to the string, and I created a blank page.
I did not get an error, but no file was uploaded.
 
Back
Top