IIS not giving line numbers in stack trace even though pdb present

后端 未结 4 1735
滥情空心
滥情空心 2021-01-12 11:11

Web config has debug=true and the project is a debug build and the pdb files are present in the bin directory, but I do not get line numbers in my stacktrace when an excepti

相关标签:
4条回答
  • 2021-01-12 11:25

    Maybe this could help, until you can find a better solution:

    • Enable Stack Trace Line Numbers in ASP.NET and SharePoint and GAC-ed Assemblies
    • Display source file and line number when in production server
    0 讨论(0)
  • 2021-01-12 11:30

    It turns out using impersonation with the web.config:

    <identity impersonate="true" />
    

    causes the loss of the line numbers in the stacktrace. I took the entry out and my line numbers returned, put it back and after a few hours (Kerberos ticket refreshing?) the line numbers disappeared again.

    Not sure why impersonation affects the stack trace but it does - would be happy to have someone confirm / explain this...

    0 讨论(0)
  • 2021-01-12 11:31

    According to question 4130956: If impersonate="true", to get line numbers in the stack trace, you need to assign the 'Debug Programs' user right to the account that you are using to log in.

    0 讨论(0)
  • 2021-01-12 11:44

    Check the MAchine.Config file

    In ASP.NET 2.0 there is a switch that can be turned on in machine.config that turns off all debug=true, so in 2.0 applications you can do this directly without worrying about finding out which applications do and don’t have it.

    <system.web>
    
          <deployment retail=”true”/>
    
    </system.web>
    

    Sources from http://blogs.msdn.com/tess/archive/2006/04/13/575364.aspx

    0 讨论(0)
提交回复
热议问题