We have a custom module on a dnn page that throws a Page_Load_Exception but does not include a stack trace in the EventLog*. The exception occurs apparently before our module is loaded, and our module works fine in other environments.
Is there a setting somewhere the disables or enables getting stack traces?
Now, in development, if I force Page Load Exceptions, I do get a stack trace, but in trying to figure out why I looked at the DNN code and noticed this in PageBase.cs
protected override void OnError(EventArgs e) { base.OnError(e); Exception exc = Server.GetLastError(); Logger.Fatal("An error has occurred while loading page.", exc);
From what I've read, there's evidently some cases in asp.net where Server.GetLastError() will return null. A technique for avoiding this is to deal with Server.GetLastError() in global.asax and then stash it for later use by pages. Do you think this could be a cause in DNN of us ultimately not getting a stack trace?