In my application I save some data related to the users sessions in the database. When the user logoff I cleanup all his session data from the database. So far, so good.
But, when IIS is restarted, all the active sessions are invalidated without the chance to gracefully cleanup.
So, I need to identify when IIS is restarted to solve this situation.