asp.net - Is showing the Exception StackTrace useful in a RELEASE assembly or only a DEBUG .dll -
I have gone for some time to improve handling error in my webservice - in particular, the form of this example Showing StackTrace in:
hold (exception pre) {EventLog log = new event log (); Logs. Source = g_EventSource; StringBinder msg = new stringbilder ("The update rickcode method has been logged in exception:"); Msg.Append (Environment.NewLine); Msg.Append ("passedURL ="); Msg.Append (passedURL); Msg.Append (Environment.NewLine); Msg.Append (ex.Message); Msg.Append (Environment.NewLine); Msg.Append (ex.Source); Msg.Append (Environment.NewLine); Msg.Append (ex.StackTrace); Logs. WrititeEntry (msg.ToString (), EventLogEntryType.Error, 100); Return msg.ToString (); }
My question is, when I publish my website, it is compiled as RELEASE instead of DEBUG? I only publish .dll and web.config (no source) when I compile in DEBUG mode, but when an error is logged, then StackTrace returns the number of lines in my development machine Like:
C: \ Documents and Settings \ johna \ My Documents \ Visual Studio 2008 \ Projects \ etc.
In short, a release mode DLL will still show up on the stack trace? I think it will definitely not happen; My system administrator has raised this question because we are ready to go to the second level of deployment.
You can get line numbers in stack trace messages, but you must include PDB files. There is also no problem in release mode.
Comments
Post a Comment