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:
I should have used a full url like this:
When sending a POST, you need to specify a page to post to. Lesson learned.