I successfully made it through the 1st 2 Try It Out exercises for handling exceptions and global exceptions. But in order to see my Global Exception page (OtherErrors.aspx) I forced an error in the system by commenting out the web.config system.net element (the smpt deliveryMethod stuff). This led to several findings I'd like to get your input on:
1 - The global.asax also uses the mail system, so I had to comment out the send mail command there. But it raised a question of Try-Catch in global.asax. It's probably an academic issue since we need to not have errors in the error handling method, but...
Is that VB
(or C#) coding in the global.asax file? And can a Try-Catch be implemented there? Wouldn't that be desirable in order to avoid legitimate errors such as the mail server is down, etc.?
2 - Even after I commented out the induced mail system error in global.asax, I ended up with what I believe is an AJAX script error. The 1st line of the file is: // Name: MicrosoftAjaxWebForms.debug.js
The error was Line: 885
"Error: Sys.WebForms.PageRequestManagerParserErrorExceptio n: The message received from the server could not be parsed."
If I change the web.config <customErrors> element to NOT
include "redirectMode="ResponseRewrite", then I don't get the script error and my OtherErrors.aspx appears without error.
Can you explain what's happening there?
I know that's a lot of "cross wiring", but I'm trusting you'll be familiar with it and have some guidance about what I observed.
I just wanted to see OtherErrors.aspx invoked; it turned into more than I expected.