views:

383

answers:

0

Note: I have done hours of digging for the answer, and couldn't find one.

I have an ASP.NET MVC (2.0) application, hosted on IIS7 (integrated mode).

When GET request is made to /Toons/List - I get a redirect (302) to /Toons/List/ which is expected.

THE PROBLEM
But when I send a POST request, say to /Toons/Add (notice no trailing slash) server returns, again, redirect (302) to /Toons/Add. At this point, FireFox, mistakenly sends GET request to that redirect-to URL. I.e. [GET] /Toons/Add/ instead of [POST] /Toons/Add/. This is incorrect, but known behavior. Since there is no [GET] on /Toons/Add/ - I get resource not found (404).

I host my app with webhost4life and have no access to IIS7, which limits my use of URL rewriting and using modules (I'm working with them to work around this). But even than, is ISAPI the best way to go? I don't know it enough to feel good about doing it this way.

This got to be a common problem, I'm surprised I couldn't find an easy solution for this.

Is there a solution that doesn't involve using .aspx / .mvc suffix, and URL rewriting?
Out of those two, if I have to, which one should I prefer?

Any ideas / suggestions?

EDIT:
I have read http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx, as I said, I'm trying to find an easier solution, a "Just Work" option.

EDIT:
I have seen solution with appending slash (/) to every URL, again, doesn't seem to be most elegant solution.