- 8 Week Game
- Quick Ref
Archive for March, 2010
A colleague of mine is developing an access controlled solution which prevents users logging in with the same credentials from mutliple locations, using ASP.net membership. For this he checks session expiry times against the last activity date in the database to see if the user has left the site allowing the session to expire- but he noticed today the code had stopped working.
The clocks went forward an hour in the UK on Sunday just gone as we go into British Summer Time (BST) instead of GMT which turned out to be the problem. ASP.net membership logs all times in the database using UTC time, matches GMT- the moment we moved into BST we came an hour out of sync! So he had to convert the code to change our local GMT time to UTC before running any comparisons. Sql server actually has a function to return the current UTC date/time;
I had a weird error today about not being able to “connect to the designer.cs” file for one of my pages. I easily fixed this by just deleting the offending designer file and re-generating it. Apparently it should auto regenerate just by opening the page in the design view and changing something- but this didn’t seem to work. I had to right click the aspx file and click “Convert to Web Application” which instantly dropped a new designer.cs file back in there.
Incidentally this is my 100th blog post on here!