PageMethods and Application_Error - ASP.NET Webforms
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.
精彩评论