views:

281

answers:

3

Does anybody have any clever solutions that they've used to turn on customErrors for everybody except for "us", where us = everybody on our network, IP range, etc.

Therefore, outside world: friendly error page. Us: nasty yellow screen.

+4  A: 

How about a friendly error page with additional info for internal guys (stack trace, line numbers etc)

You could easily add an ip address check in your custom error page and hide the nasty details from outside visitors.

chris166
A: 

Try using ELMAH.

ELMAH stands for Error Logging Modules and Handlers, and it's an application-wide error logger.

Joseph
+2  A: 

In the Global.asax there is a Application_Error method that is called whenever an exception occurs, maybe you can do something with that.

MSDN Article about Error Handlers

GoodEnough