So this is a nifty little tip ive picked up when i had installed .NET 4.5. As many other developers i went on installing the beta of Visual Studio 2012, and .NET framework 4.5. This was working fine, util i tried starting up one of my Sitecore sites that ran .NET 4, and logging into the backend. This gave me an exception
Object of type 'System.Int32' cannot be converted to type 'System.Web.Security.Cryptography.Purpose'
Its was kinda annoying, but i found a workarround, by using first loggin into the dbbrowser, and using authorized session to reach the real sitecore backend. for some reason that bypassed the code that was making the exception. Anyway now the Visual Studio 2012 and .NET framework 4.5 has been released, and i found that the problem still existed.
Some smart Sitecore developers have found a workarround for your sites. you simply change the value of the setting login.rememberlastloggedinusername to false
<setting name="login.rememberlastloggedinusername" value="false" >
This will bypass the code that was throwing the exception.
Sitecore is aware of the problem, and its been fiexed for Sitecore CMS 6.5.0 rev. 120706 (6.5.0 Update-5), and newer.