开发者

PageMethods and Application_Error - ASP.NET Webforms

开发者 https://www.devze.com 2023-02-20 09:13 出处:网络
My application is setup to log exceptions and this is done in the Application_Error method. I\'ve started adding Page Methods (which are static). Exceptions in Page Methods do not trigger the Applicat

My application is setup to log exceptions and this is done in the Application_Error method. I've started adding Page Methods (which are static). Exceptions in Page Methods do not trigger the Application_Error method in Global.asax.开发者_StackOverflow中文版cs

What is the best practice to catch these exceptions?

PS: I am using JQuery ajax to call PageMethods


I would recommend you look into ELMAH. Don't reinvent the wheel if you don't need to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号