Why is it not OK to do a HTTP.Post to the default page on ASP.NET I have a default.aspx file that i want to be accessed when an external utility do a post to the
http://{ip}/WebSiteName
I want that the actual po开发者_开发百科st will be to this page:
http://{ip}/WebSiteName/Defualt.aspx
or
http://{ip}/WebSiteName/Handler.ashx
I think that if i get it to post to the first url, i will be able to recreate a new post to the second url - which is my original target.
Thanks, Itay
Check out this KB article: http://support.microsoft.com/kb/216493
HTTP Error 405 Method Not Allowed
The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.
This problem occurs if the following conditions are true:
* You do not specify the file name. For example, you do not specify http://Server/Web/.
* The Scripting Object Model (SOM) is enabled.
* A DTC event is called.
It is a known bug in IIS 4 and 5 but corrected in 6.
You could set your first page IIS looks for to be index.aspx, then on that page do a Response.Redirect("~/Default.aspx", true) and that should reproduce what you need.
精彩评论