This post originated from an RSS feed registered with .NET Buzz
by Brendan Tompkins.
Original Post: An Incorrect Server Time can Crash Your Applications!
Feed Title: Brendan Tompkins
Feed URL: /error.htm?aspxerrorpath=/blogs/brendan.tompkins/Rss.aspx
Feed Description: Blog First. Ask Questions Later.
I was going to title this post âAn Incorrect Server Time can Crash Your ASP.NET 2.0 Applications!â but I thought that would be too sensational⦠But, itâs true, my ASP.NET 2.0 apps pooped out due to a server time being off. . Hereâs what happened:
The other day we started seeing one of our two web servers crashing. We recently deployed our new public site onto ASP.NET 2.0, and everything had been working fine up until this point. The strange thing about this server crashing was that both servers are identical hardware, had the same codebase deployed, and are load balanced with a Cisco CSS hardware. Why one server would begin to fail and not the other was mysterious.
Well, I went looking in the event log and saw this error, at regular intervals, every 5 minutes. It turns out that after a few of these, the server would crash, and weâd get âService Unavailableâ when browsing to that server. This is what the event log looked like:
When an unhandled exception is thrown in a Microsoft ASP.NET-based application that is built on the Microsoft .NET Framework 2.0, the application unexpectedly quits. When this problem occurs, no exception information that you must have to understanding the issue is logged in the Application log.
Okay, nice feature. Anyhow, I knew that WSE was somehow involved (due to the web.services2 in the description) and that I had an unhandled exception in code somewhere (sloppy on my part). I suspected a regular process since the errors were so periodic, and we do indeed have some processes that go off every 5 minutes and do some WSE stuff. Well, finally with my trusty copy of SysInternalâs DebugView (which will show you Trace.Write, and Debug.Write output) I tracked it down to this error: A WSE message failed to decrypt because it was âsent in the future.â Sent in the future? Cool! No wait, thatâs impposible. I checked and sure enough, the serverâs time was off by a minute.
So the time was off, the message wasnât decrypted, WSE threw an exception, my sloppy code failed to handle it, and bang! Dead server.. I thought Iâd pass this along, this was the strangest error fix Iâve had in a while!