S
shapper
Hello,
I have the following class to be used in profile:
<Serializable()> _
Public Class Options
Inherits ProfileBase
Private _Newsletter As Boolean
Public Property Newsletter() As Boolean
Get
Return _Newsletter
End Get
Set(ByVal value As Boolean)
_Newsletter = value
End Set
End Property ' Newsletter
End Class ' Options
And in Web.Config I have:
<add allowAnonymous="false" name="Options" type="Options"
serializeAs="Binary"/>
I am getting the following error:
Type 'System.Web.Profile.ProfileBase' in Assembly 'System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is
not marked as serializable.
Why do I get this error?
I thought when creating profile classes that I should always use
<Serializable()>.
Thanks,
Miguel
I have the following class to be used in profile:
<Serializable()> _
Public Class Options
Inherits ProfileBase
Private _Newsletter As Boolean
Public Property Newsletter() As Boolean
Get
Return _Newsletter
End Get
Set(ByVal value As Boolean)
_Newsletter = value
End Set
End Property ' Newsletter
End Class ' Options
And in Web.Config I have:
<add allowAnonymous="false" name="Options" type="Options"
serializeAs="Binary"/>
I am getting the following error:
Type 'System.Web.Profile.ProfileBase' in Assembly 'System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is
not marked as serializable.
Why do I get this error?
I thought when creating profile classes that I should always use
<Serializable()>.
Thanks,
Miguel