ErrorHandlerAttribute and migration from MVC 2 to MVC 3
I have migrated website from MVC 2 to MVC 3 and now faced with problem that my error handler attribute is not working
I'm marking my method as
[HttpPost]
[CampaignRequestErrorHandler]
public ActionResult Fini开发者_运维问答sh(T request)
{
if (!ModelState.IsValid)
{
return GoToCreateView(request);
}
try
....
I added my CampaignRequestErrorHandler to Route filters and it worked but I need to enable only method scope error handling.
Please help me if you have some idea where is the bug
Just to let you know that ASP.NET MVC3 can use global filters to handle errors.
You can read more here, here and here.
精彩评论