I have set up ELMAH on my Asp.Net MVC 5 website. It's working fine but its error details page is not showing me the exact line that's causing the exception. I was wondering whether I could get the same error page as the default Asp.Net error on my local machine.
Asked
Active
Viewed 764 times
1 Answers
3
If you deploy the PDB files corresponding to the DLLs in your web application's or site's bin
directory then the stack trace in the error will contain line information as well.

Atif Aziz
- 36,108
- 16
- 64
- 74
-
So did you get a chance to try it out and did it work? – Atif Aziz Apr 05 '15 at 22:20
-
Hi. Sorry I forgot to update this. Yes, I uploaded the PDB files and it definitely changed the error logs but it's still not the same as the ones I get when I use my machine. In my dev machine, I can see exactly which line is causing the error and it has a red text. Can I achieve the same with ELMAH? – Alireza Noori Apr 06 '15 at 07:23
-
@AlirezaNoori I'm afraid not. ELMAH usually does not have access to source code in production so that's not a scenario that really needed addressing. Next best you can get is the [YSOD](http://en.wikipedia.org/wiki/Screen_of_death) from ASP.NET for pages & controls that ELMAH does capture if available. – Atif Aziz Apr 06 '15 at 17:03
-
The YSOD is exactly what I'm looking for but I don't want the clients to see it. That's why I use ELMAH and use custom error reporting to the users. – Alireza Noori Apr 06 '15 at 20:46