MVC2 ActionFilterAttribute – During OnActionExecuting Don't use Redirect Use RedirectResult

28 באפריל 2010

Still haven't upgraded to the visual studio 2010 RTM, so I'm talking about version RC1 of MVC2(the one that shipped with VS2010 RC),But i guess this is also the case with the RTM version.We followed the excellent post by Rob Conery and implemented our own ActionFilterAttribute to validate that only authenticated users gain access to some of the actions.At OnActionExecuting we checked for anonymous users and redirected them to the login page. All went well till Accidentally i stumbled upon an exception right before the user was redirected to the login page,users will never see this exception, but the...