I've used the PermanentRedirectResult
from here to perform 301 redirects in ASP.NET MVC 1. Since upgrading to 2.0, the 301 response is no longer sent. Instead, a 200 response containing just the class name is sent.
Setting a breakpoint indicates that the ExecuteResult
method on PermanentRedirectResult
is never called. Apparently the framework is just calling ToString() on the result instead of executing it.
Has anyone else seen this? Is this a deliberate change in 2.0, and if so what do I now need to do to use a custom ActionResult?