Exception shows developer's path instead of servers Exception shows developer's path instead of servers asp.net asp.net

Exception shows developer's path instead of servers


This information is stored inside the .PDB files that were generated during the compilation of the source code. They contain the debugging information. But normally people don't compile applications on their machines before shipping them into production. They use continuous integration and build servers that are dedicated for this purpose.

Now if you want to turn off debugging details you could configure the level of verbosity and debug info in the properties of your project.


In order to remove it, go to Properties -> Package/Publish Web:

enter image description here

Make sure to click or check the "Exclude generated debug symbols".

This will Publish your site without PDB files attached on the Bin folder. Make sure you are on Release mode before publishing your site for Live environment. One of the main difference of publishing your site without PDB files is that you cannot see the line number on the StackTrace when an error happens on your site.