We have a custom profile class inheriting from ProfileBase. We'd like to pop this object into Session to remove the need to keep retrieving it per request.
We're using ASP.NET State Server and we're hitting the following exception:
Type 'ProfileCommon' in Assembly 'App_Code.nvrow7px, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Adding Serializable to our class didn't help. I assume the "ProfileCommon" in the message is a bit of red herring as that's not the name of our class but it is the nmae when you use Profiles with Web Projects.
Is the only option to translate our custom Profile object to a serializable type for "transport" in and out of Session?
Cheers