ASP.NET error for ASP.NET for one user, cannot be reproduced during development - how can I debug?

I inherited a client that accessed the asp.net web application where clients can upload files to our file servers. It works great for all users except one person. Two weeks ago, she tried to download a file and received the following error:

The reference to the object is not installed in the instance of the object.

The following describes which line of code is causing the error. However, it is in our products, the external environment, and debugging is disabled. Thus, this information, I suppose, is more or less apparent (the lines of code that it reports the error do not really make sense to me, because this is the cause of the error).

I know that something is available, but it is not, but I could not reproduce the error in my development environment, and it works fine for the rest of our user base. The same user experienced the error two weeks ago, and then tried another file yesterday and received the same error.

I know that all this sounds very vague, but I think my question is, does anyone have any good ideas on how to track user error execution so that I can see exactly which line of code REALLY causes it ? As I said, I could not reproduce the error, in dev, in production, inside, outside, and no other users encountered a problem. My only idea was to publish a debug version for our client facing the production site, but I really don't want to. Thanks!

+4
source share
1 answer
  • Are you sure that the information you receive in the exception is erroneous? It is so easy to make this assumption, we all did it, only to be proved wrong when you spent a little more time on it.
  • Make sure you have PDB (Debug Symbols) installed. You can still push them, even if the site is built in "Release" rather than "Debug", to ensure that the line numbers in the stack trace match.
    • Make sure that you deploy .PDB matching .PDB , those that do not match will not be used.
    • Save .PDB files under version control along with your versions, it is much easier to test problems if you have both the code for this particular version (for example, process your compiled output and .pdb as you would use your source).
  • Add extra tools to the code that logs in using something like log4net (don't write your own logging system โ€” other people are better at it than you, or me!), Which logs as many states as possible around the area that runs into the problem .
    • Make the recording enable or disable based on configuration settings. log4net simplifies this.
    • Make sure your registration code checks all the objects that it checks for null before using them, so you won't get a NullReferenceException caused by the registration code.
+1
source

All Articles