ASP.NET MVC POST incorrectly returning HTTP 302

For me, we had error redirect configured for custom errors via web.config

<system.web> 
...  

 <customErrors mode="On" defaultRedirect="~/error/errorpage">
...

</customErrors>

It was doing a 302 after an internal error. Setting customErrors mode="Off" bubbled the error up all the way to the browser.


Use AllowAnonymous attribute in your controller Method

[AllowAnonymous]
[HttpGet]
public ActionResult Index() {
    MyModel model = new MyModel();
    model.Debug += "GET Method";
    return View(model);
}

Hope it helps


After much back and forth, the hosting provider brought it to my attention that they don't support ASP.NET MVC 4, only up to 3. I'm not sure how or why they don't support the newer version, but that seems to be the root of the problem.

Needless to say, I moved to a host that supports the recent frameworks. Now the site works perfectly.