I was getting this "HTTP Error 405 - Method not allowed" error at work the other day and for the life of me, I could not figure out why I was getting that. I was sending a post through HttpWebRequest to a test web site and the web site was properly configured in IIS. As it turned out the url that I was using was not correct. I was using an url like this:
http://localhost/testSite/
I should have used a full url like this:
http://localhost/testSite/default.aspx
When sending a POST, you need to specify a page to post to. Lesson learned.
posted @ Friday, January 16, 2009 7:51 PM