asp.net - Why are exceptions in partial postback (UpdatePanel) not logged to eventlog -


in standard postback, if exception occurs, error logged event log under source "asp.net 4.0.30319.0". lots of details here.

if exception occurs during partial postback function via updatepanel call, why exception not logged event log, , there need enable cause functionality work?

i can verify in both cases onerror function of page fire, in postback error logged.

i don't know why exceptions aren't logged event log

here not-so-nice work-arounds i've found far:

rethrow in asyncpostbackerror

catch exception in scriptmanager's asyncpostbackerror event. wrap , throw it.

disadvantages

  1. the client javascript code loses original exception message.
  2. the exception wrapped unnecessarily, may make debugging tiny bit more tedious.

disable enablepartialrendering

disable enablepartialrendering on scriptmanager.

advantages

  1. errors handled in manner consistent non-async postbacks.

disadvantages

  1. seems kind of defeat purpose of using updatepanels.
  2. you lose access client-side classes such sys.webforms.

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -