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);


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Re: 405 error on put by Patrice

Patrice
Thu Jun 17 10:43:14 CDT 2004

Try to POST to a page rather than to a directory (String
uriString=http://localhost/PineNet/SomePage.aspx)

Patrice

--

"rkmoray" <rkmoray@aol-dot-com.no-spam.invalid> a écrit dans le message de
news:40d1bac8$1_2@Usenet.com...
> 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);
>
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com



re:405 error on put by rkmoray

rkmoray
Thu Jun 17 13:35:41 CDT 2004

I added blank.aspx to the string, and I created a blank page.
I did not get an error, but no file was uploaded.


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Re: re:405 error on put by Patrice

Patrice
Fri Jun 18 03:19:41 CDT 2004

BTW , by "put" do you mean the english verb or the HTTP verb ? For now you
issue a "POST" request. This is what I would do but do you have some code
server side to handle the posted file ?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetWebClientClassUploadFileTopic1.asp

shows both client side and seerrver side code to post files...

Patrice

--

"rkmoray" <rkmoray@aol-dot-com.no-spam.invalid> a écrit dans le message de
news:40d1e47d_2@Usenet.com...
> I added blank.aspx to the string, and I created a blank page.
> I did not get an error, but no file was uploaded.
>
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com