Error page reference numbers for users of web applications

Posted by: missytrussel123 on 16 December 2021, 5:15 pm EST

  • Posted 16 December 2021, 5:15 pm EST

    Hi
    I'm after a solution for obtaining or generating reference numbers which users can then forward to tech support when they encounter an error on the website. This number would be referenced by the log record which would contain full error details so that they can be linked.

    Currently the boilerplate MVC template error model passes either `Activity.Current?.Id` or `HttpContext.TraceIdentifier` back to the view, however these are both quite long reference numbers and I was after something a bit more user-friendly, say 6-10 characters max.

    I was wondering if there was a common convention for this, or if there is a feature already in place as part of .NET (or an external package)?
  • Replied 10 January 2022, 3:22 pm EST

    Hi,
    There is no direct way for this, You may handle the code using the try-catch and throw an exception with your own code that can be used for debugging purposes as you would like.


    Regards,
    Manish Gupta
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels