custom error page and email notification problem

  • Thread starter Thread starter Guest
  • Start date Start date
My current plan is to use client side (javascript) logic to read/write to an SQL server database - if an email had been send it wouldn't send an email just display the page
The javascript idea isn't going to fly as it's client side and all server side operations are executed first - so your server would send the email before it read any javascript telling it not to.

My suggestion would be to have a database which logs a page error every time it occurs. You could use this database to see if error X has happened on page Y before. If it hasn't - send an email, if has - don't. It would also be worth having a switch in there to say that you've fixed whatever caused the problem and if it happens again send an email - otherwise you may get the problem once, fix it and it occurs again a few months later and you'd never know.

*edit*
just noticed you mentioned you're a C++/JS programmer. Assuming the server is ASP.NET you can write in either of those languages. If it's classic ASP you can also write that in JScript.
 
Back
Top Bottom