Steps to prepare your BizTalk environment for diagnostics

  • Sandro Pereira
  • May 26, 2011
  • 3 min read

In the past, I published an article about an unhandled exception (‘<System.StackOverflowException>’) that occurred in BTSNTSvc.exe with the promise that I would explain in detail how I was able to debug the .NET stack using the Microsoft Symbol Server to obtain debug symbol files, and now is the time.

📝 One-Minute Brief

Preparing a BizTalk environment for deep diagnostics requires more than just checking Event Viewer. This guide details how to set up the Microsoft Symbol Server and configure advanced troubleshooting tools like Process Monitor (ProcMon) and Process Explorer. By configuring environment variables for symbol paths and linking them to diagnostic tools, developers can capture detailed .NET stack traces when unhandled exceptions (like StackOverflowException) occur, allowing for precise pinpointing of the failing code within the BTSNTSvc.exe process.

Step 1: Prepare the environment for debugging (set up the Symbol Server)

First note: if you are using a Lab environment with Visual Studio, like me, skip steps 1 and 2.

control panel Environment Variables
  • In the System Variables section, press New and add the following variable:
    • Variable name: _NT_SYMBOL_PATH.
    • Variable value: SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols.
control panel Environment Variables-new-system-variable
  • In the User variables for user section, press New and add the following variable:
    • Variable name: PATH.
    • Variable value: C:\tools\bin.
      control panel Environment Variables new user variable
      • Press the OK button twice.

        Step 2: Prepare the Process Monitor

        • Run procmon.exe.
        run procmon
        • Go to the menu option Options Configure Symbols.
        procmon Configure Symbols
        • Ensure that the DBGHELP.DLL path is equal to C:\TOOLS\DEBUG\dbghelp.dll or is one path of the version used in Visual Studio.
        • Ensure that the Symbol Path is equal to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
        procmon Configure Symbols values
        • Press the OK button.

          Step 3: Prepare the Process Explorer

          • Run procexp.exe.
          run procexp
          • Go to the menu option Options Configure Symbols.
          procexp Configure Symbols
          • Ensure that the DBGHELP.DLL path is equal to C:\TOOLS\DEBUG\dbghelp.dll or is one path of the version used in Visual Studio.
          • Ensure that the Symbol Path is equal to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols.
          procexp configure symbols values
          • Press the OK button.

            Now, when the exception occurs, the system will automatically instantiate one Visual Studio instance with the trace .NET stack, giving me the exact point of the problem.

            References

            Once again, I want to thank Jorge Lourenço for help!

            Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

            Thanks for Buying me a coffe
            Author: Sandro Pereira

            Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

            1 thought on “Steps to prepare your BizTalk environment for diagnostics”

            Leave a Reply

            Your email address will not be published. Required fields are marked *

            The Ultimate Cloud
            Management Platform for Azure

            Supercharge your Azure Cost Saving

            Learn More
            Turbo360 Widget

            Back to Top