Unable to serialize the session state

Tech-Archive recommends: Fix windows errors by optimizing your registry



I have an object I am unable to put in my session. I have others that have
no problem. The difference is the the one I am having problems with was
created in VS 2003. The others were created using DW and compiling using the
commandline and they work fine.

The error I am getting is:

Unable to serialize the session state. Please note that non-serializable
objects or MarshalByRef objects are not permitted when session state mode is
'StateServer' or 'SQLServer'.

The start of the code is:

namespace MyFunctions
{
/// <summary>
/// Summary description for Class1.
/// </summary>

[Serializable]
public class NewHire
{

Why won't this work?

Thanks,

Tom


.



Relevant Pages

  • Session state and user controls
    ... The Rule Manager is used to modify data in classes defined within the ... The RuleManager stores an object from the RuleEngine in session state. ... "Unable to serialize the session state. ...
    (microsoft.public.dotnet.framework)
  • Problem with a DataRow in Session
    ... from the database and I store the validated users DataRow into Session ... Unable to serialize the session state. ... objectType, ISurrogateSelector surrogateSelector, StreamingContext ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Session error
    ... Unable to serialize the session state. ... restriction applies if similar serialization is done by the custom session ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Store Asyncresult to session with sessionState mode = "SQLServer"
    ... Storing session in a memory cache within the same process and remotely in ... serialization therefore any references can be stored while session state ... Unable to serialize the session state. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Unable to Serialize
    ... namespace MyFunctions ... you posted nothing to serialize. ... Could this be a problem with Web Services? ... I have an object I am unable to put in my session. ...
    (microsoft.public.dotnet.framework.aspnet)