Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 exception is thrown.

Works fine with local IIS/Cassini but not on our test IIS servers. Is there some obvious setting that I might be missing?

like image 863
Graeme Avatar asked Apr 20 '10 08:04

Graeme


3 Answers

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...

like image 151
Graeme Avatar answered Oct 13 '22 18:10

Graeme


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.

like image 28
user281806 Avatar answered Oct 13 '22 17:10

user281806


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

like image 1
Dave Walker Avatar answered Oct 13 '22 16:10

Dave Walker