405 Error


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.
«January»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567