Object Reference Error -To Uncheck Optimize Code option

novakov

New Member
We were getting lots of unhandled null reference exceptions in our application as below.\[quote\] System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at\[/quote\]To get the exact line numbers in the error logs we deployed PDB files in the production environment with PDB only option enabled in release mode.Now we are getting the line numbers error description but the lines numbers are always pointing to finally block where this is no possibility for the error to occur.In the Project properties when give the build in release mode the Optimize code will be checked, we found that due to this option the line numbers are incorrect.Now we are planning to give a deployment in production with this option unchecked so that we will get the correct line numbers. Wanted to check if this will have any impact to the performance of the application if we deploy with this option unchecked to production environment.Please let me know incase if you have tried this or has come across such scenarios.
 
Back
Top