Error 405 - Method Not Allowed

S

Steve Young

I am trying to use the webclient class in VB.Net ... in particular I want to
upload a file to the web server using:

dim responseArray As Byte() = myWebClient.UploadFile(uri,"POST",filename)

When I try this I get Error 405 - Method Not Allowed diagnostic message. I
have searched the help files in .Net and cannot find reference to this
error. Can someone point in the direction of a place where I can learn more
about this error ... and how to get around it?

Thanks very much.
 
H

Herfried K. Wagner [MVP]

* "Steve Young said:
I am trying to use the webclient class in VB.Net ... in particular I want to
upload a file to the web server using:

dim responseArray As Byte() = myWebClient.UploadFile(uri,"POST",filename)

When I try this I get Error 405 - Method Not Allowed diagnostic message. I
have searched the help files in .Net and cannot find reference to this
error. Can someone point in the direction of a place where I can learn more
about this error ... and how to get around it?

Maybe your webserver doesn't allow the "POST" method?
 
S

Steve Young

Well, yes ... but where can I learn more about what the "POST" method is ...
and what other methods there are ... etc. Also, I tried using localhost as
the web server (I have IIS installed) and I still get the same message. How
do I allow POST method on my own machine?
 
C

Chad Z. Hower aka Kudzu

Steve Young said:
Well, yes ... but where can I learn more about what the "POST" method is
... and what other methods there are ... etc. Also, I tried using
localhost as the web server (I have IIS installed) and I still get the
same message. How do I allow POST method on my own machine?

POST and GET are the two primary ones.

In the IIS config for each application you can configure which ones are
allowed.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top