views:

156

answers:

2

Earlier today we experienced a YSOD on one of our MVC sites running on IIS on Windows Server 2003.

Usually, these are reported via e-mail using ELMAH (using this setup), but since this was a compilation issue (of some sort), it did not get reported via e-mail.

The specific error was:

"The directory 'App_GlobalResources' is not allowed because the application is precompiled."

This is a major problem, since a potential customer could notice the problem before we do. How can we make sure these YSODs are logged, when the exception handler on the site is not called?

+4  A: 

If you can, check the event viewer on that machine. This is the logger of last resort on a Windows machine.

Andrew Hare
The event viewer had it logged. Can we easily report these events via e-mail?
mbp
You can but I don't have any experience doing so. You will need to write a custom solution or use a monitoring tool to accomplish this. Perhaps the folks over at http://serverfault.com will be able to help you with this part.
Andrew Hare
+4  A: 

It is possible to monitor the event log with VBScript. You could then email this when it occurs:

Here's an example:

http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb07/hey0226.mspx and email from vbscript: http://www.paulsadowski.com/WSH/cdo.htm

You could do this with powershell and/or another .net app on the box also.

klabranche
Thanks. I found this serverfault question helpful as well: http://serverfault.com/questions/47953/windows-event-log-email-notification
mbp