0Day Forums
Exception shows developer's path instead of servers - Printable Version

+- 0Day Forums (https://0day.red)
+-- Forum: Coding (https://0day.red/Forum-Coding)
+--- Forum: Asp.Net (https://0day.red/Forum-Asp-Net)
+--- Thread: Exception shows developer's path instead of servers (/Thread-Exception-shows-developer-39-s-path-instead-of-servers)



Exception shows developer's path instead of servers - liloqn - 07-23-2023

When an exception occurs with any ASP.NET project (possibly any .net app) the stack trace will show the path on the developer's machine, even when in production.

How to change it?

What's going on under the hood?



RE: Exception shows developer's path instead of servers - Drflattery6 - 07-23-2023

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.


RE: Exception shows developer's path instead of servers - mciver549 - 07-23-2023

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

[![enter image description here][1]][1]


[1]:


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.