During a recent debugging session involving some juicy threading issues, the logs were showing some scary stuff. Given that we’re talking about threading issues, order of operations and timing is everything. And the operations were all out of order! When the log entries were ordered by record ID you have one sequence of events yet when ordered by timestamp you have another sequence. In terms of the desired behaviour, one is spot on (when sorted by ID), the other is very wrong.
.Net 4.5
ASP.Net Cookies[FormsAuthentication.FormsCookieName] always null
Now and then you forget some small detail that has you running in circles trying to figure something out. In my case it was an authentication cookie not being persisted. After trying a few options, I realised that a list of claims were being persisted in the user data parameter! Of course, a cookie can only be 4096 bytes 😉