Author: chadivision | Posted on: 7/9/2009 1:12:56 PM | Views : 312

I'm creating an ASP.net page (2.0 platform) that stores and retrieves information using a cookie.  Everything works fine most of the time, but I've noticed that I get an error when I recopile the code and then try to read from a cookie that was created using the old build.
When I try to cast the object returned from BinaryFormatter.Deserialize(MemoryStream), I get an exception...but this only happens after recompiling (even if I didn't change any of the code).
Does .NET store a build number or something somewhere in my assembly, and then use that when doing the cast?  I'm wondering if recompiling is making .NET think that the site trying to access the cookie is a different site than the one that created it.
Any ideas?  Thanks.

...

Go to the complete details ...