简体   繁体   中英

Show Yellow Screen of Death (YSOD) to specific IP Address

We have deployed our solution to a closed environment, and sometimes it is hard to debug problems because we can't even collect logs fast enough.

We devised a way to download the local log files via our own web forms application, but if the problem prevents access to that page in the first place, we are in the dark for a few hours.

The question then is: is there a way to display the original YSOD only to a specific, static IP address? That way, we would configure our company's static IP address to allow full debugging by displaying the original error instead of the user friendly custom error page.

Apparently, the default customErrors mechanism doesn't seem to allow control this fine grained.

A solution that still respects the original customErrors configuration on web.config would be ideal, as we would like to keep the custom page for random users accessing from other addresses.

Look up ELMAH. It can be found here. I have just downloaded via Nuget and so far it's pretty cool. It keeps track of all exceptions that occur and you can see the YSOD. All you ahve to do is go to your url for example.. www.example.com/blog/elmah.axd and you are able to view all the errors that have occured. You are able to use SQL as well. If you go that route, I'm sure it's really easy to pull all exceptions that occurred on a certain IP. You can also have emails sent to you on the error, and an RSS feed. It's really easy and quick. You are able to set it up to authorized users only. I'm using Active Directory so any user in "SoftwareDevelopers" are able to see the ELMAH log.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM