By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Error 405 - Method Not Allowed

P: n/a
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.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "Steve Young" <yo***@indiana.edu> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a

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?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
* "Steve Young" <yo***@indiana.edu> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

P: n/a
"Steve Young" <yo***@indiana.edu> wrote in
news:bu*********@enews4.newsguy.com:
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

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.