After the system is released and launched, errors may occur sometimes, so the error record is very important. It plays an important role in troubleshooting and discovering errors, the common method is Log file record and Database Error record. The text does not discuss how to record error records and how to record them. Instead, it focuses more on how to better obtain specific information about errors. In other words, it provides a better description of error information to help you quickly solve the problem.
Generally, the error record is similar to the following statement (incorrect, this is only a method)
== (exp.InnerException != =
EnhancedStackTrace( StackTrace(exp, }
= ( i = ; i < st.FrameCount; i++=
= = (ParameterInfo param (param ==- ( (sf.GetILOffset() !=
The above method runs locally without any problem. We can get the detailed information about the error, especially the page, method, and row number, but after IIS is released, we will not be able to get the specific error message. Only System is returned. web. httpUnhandledException is useless for troubleshooting.
Web. the config file has made some modifications to the Session. The mode of InProc is changed to SQLServer. Is there a problem with serialization, but ASP. NET Exception and StackTrace are serialized. It is no problem to save them to the Session.
StackTrace
Change the local Session mode to SQLServer and Debug. The problem is found: new StackTrace (exp, true) does not generate the correct StackTrace at all, so the following stack tracing will not be available, this is why, and I still don't understand it. I hope I can tell you what I want to know. There is no way to solve this problem. You can use Exception. StackTrace directly. You can use the Exception attribute to get what you want. When IIS is released again, the problem arises again. This time, despite the error message "progress", it is similar
at Web.Pages.ContractMgt.ContractMgt.ContractInfo.btnRefresh_Click(Object sender, EventArgs e)
But why is there no more? Shouldn't it be the following?
at Web.Pages.ContractMgt.ContractMgt.ContractInfo.btnRefresh_Click(Object sender, EventArgs e) D:\newWorkSpace\src\projectlms\Web\Pages\ContractMgt\ContractMgt\ContractInfo.aspx.cs:line
We also need the file name and row number.
No way, Google. After reading some documents, I found the cause. It turns out that when I published it to IIS, I deleted the compiled PDB file! The PDB file stores all the symbols in the corresponding module (dll or exe), as well as the address, file name, and row number of the symbol. It turns out that. Then add it back and run it again. It still doesn't work. It crashes. Continue to Google. Some people on the Internet say that the configuration of web. config will be affected. Delete it and try again.
<authentication mode= /><identity impersonate= />
This is the last time, but why is the above configuration affected.
Another important question is, can I include the PDB file when releasing the official library? Continue Google
1. Will the performance be affected?
Http://www.wintellect.com/blogs/jrobbins/do-PDB-files-affect-performance (Do PDB Files Affect Performance ?)
The executive summary answer: no, generating PDB files will have no impact on performance whatsoever. as for references that I can point you too, I haven't found any on the web that answer the exact question so let me take both. NET and native development in turn.
The http://stackoverflow.com/questions/1270986/do-pdbs-slow-down-a-release-application (Do. pdbs slow down a release application ?)
Http://developer.51cto.com/art/201306/397712.htm (what is the. net pdb file ?)
For. NET applications, generating PDB files does not affect Compiler optimization, so it does not affect application performance.
Summary: this will not affect the performance, but will only affect the attributes of one DebuggableAttribute in the generated assembly.
2. Will it affect security?
Http://stackoverflow.com/questions/1307482/whats-the-risk-of-deploying-debug-symbols-pdb-file-in-a-production-environmen (What's the risk of deploying debug symbols (pdb file) in a production environment ?)
Http://stackoverflow.com/questions/933883/are-there-any-security-issues-leaving-the-pdb-debug-files-on-the-live-servers
It does not seem to affect security.
But remember to make the following settings (VS2010 interface)