阅读背景:

在捕获MVC 3中正确的JSON格式的错误时,如何使用ELMAH记录错误

来源:互联网 

I have an ASP.NET MVC 3 application where I'm making an AJAX call and expecting a JSON result back. I'm using ELMAH to log errors. While testing I had an unexpected error. ELMAH logged the error, but my client side script doesn't because the result is not proper JSON now. If I handle all errors in the controller to return a proper JSON result, then the error doesn't get logged by ELMAH. I know I can call ELMAH specifically to log the error, but I rather like that I don't have to do that anywhere else.I have an ASP.NET MVC 3 application where I'm m




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: