Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC + IIS7 + FireFox : trailing slash in URL
    primarykey
    data
    text
    <p>Note: I have done hours of digging for the answer, and couldn't find one. </p> <p>I have an ASP.NET MVC (2.0) application, hosted on IIS7 (integrated mode). </p> <p>When GET request is made to <code>/Toons/List</code> - I get a redirect (302) to <code>/Toons/List/</code> which is expected. </p> <p><strong>THE PROBLEM</strong><br> But when I send a <strong>POST</strong> request, say to <code>/Toons/Add</code> (notice no trailing slash) server returns, again, redirect (302) to <code>/Toons/Add/</code>. At this point, FireFox, mistakenly sends <strong>GET</strong> request to that redirect-to URL. I.e. <code>[GET] /Toons/Add/</code> instead of <code>[POST] /Toons/Add/</code>. This is incorrect, but known behavior. Since there is no [GET] on <code>/Toons/Add/</code> - I get resource not found (404). </p> <p>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. </p> <p>This got to be a common problem, I'm surprised I couldn't find an easy solution for this. </p> <p>Is there a solution that doesn't involve using .aspx / .mvc suffix, and URL rewriting?<br> Out of those two, if I have to, which one should I prefer?</p> <p>Any ideas / suggestions?</p> <p><strong>EDIT</strong>:<br> I have read <a href="http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx" rel="noreferrer">http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx</a>, as I said, I'm trying to find an easier solution, a "Just Work" option.</p> <p><strong>EDIT</strong>:<br> I <em>have</em> seen solution with appending slash (<code>/</code>) to every URL, again, doesn't seem to be most elegant solution. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload