views:

359

answers:

4

This is running me nuts. I have this web service implemented w/ C# using VS 2008. I publish it on IIS. I have modified the release build so the pdb files are copied along with the dlls into the target directory on inetpub.

Also web.config file has debug=true.

Then I call a web service that throws an exception. The stack trace does not contain the line numbers. I have no idea what I am missing here, any ideas?

Additional Info: If I run the web app using VS built-in web server, it works and I get line numbers in stack trace. But if I copy the same files (pdb and dll) that the VS built-in web server is using to IIS, still the line numbers are missing in stack trace.

It seems that there is something related to the IIS that ignores the pdb files!

Update When I publish to IIS, all the pdb files are published under the bin directory and everything looks fine. But when I go to "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" under the specific directory related to my project, I can see that the assembly (.dll) files are all there, but there is no pdb files. But this does not happen if I run the project using VS built-in web server. So if I copy the pdb files manually to the temp folder, I can see the line numbers.

Any idea why the pdb files are not copied to the temp folder?

BTW, when I attach to the worker process I can see that it says Symbols loaded!

A: 

Maybe the server you're publishing to has the <deployment retail="true" /> setting configured in the system machine.config file in:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG

For more info see:

ASP.NET configuration - deployment Element (ASP.NET Settings Schema)

Just a thought.

Kev
i checked that file and there is no <deployment retail="true" /> in that file.
kaptan
A: 

Attach to worker process using VS or windbg and see whether it is able to find your pdb and whether it matches your assembly?

Another common reason is you are actually using release dlls [which are optimised]. I doubt it is anything specific to do with IIS.

Fakrudeen
A: 

Please make sure to set "debug=true" in the web.config, without it, no line numbers are shown in exceptions.

titrat
it is already there
kaptan
+1  A: 

Not sure if this will help, but in my VS2008 C# project properties, under the build tab, there's an Advanced button where I had to set debug info to "full" or "pdb-only"

harvest316