Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Error
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01437935
Message ID:
01437947
Views:
39
No change at all? Are you sure - the error is pretty specific:
'System.Runtime.Serialization.SerializationException: Type 'Marois.WorkIT.DataAccess.Address' in Assembly 'DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Marking it as serializable should get rid of that error but if any of the properties of the Address class were not serializable you may get a different error. Can you post the code for the class?


>Done. No change.
>
>
>>As a first step try adding the [Serializable] attribute to the Address class
>>
>>>I have multiple projects in my WinForms solution.
>>>
>>>I have a class called Address in a project called DataAccess. This class has properties for each field in the address table. In the project WorkIT I have a user control called crlAddress that is the UI to the Address class.
>>>
>>>When I try to drag the crlAddress control into the crlCustomer control, I get the following:
>>>
>>>
>>>Failed to create component 'crlAddresses'.  The error message follows:
>>>
>>> 'System.Runtime.Serialization.SerializationException: Type 'Marois.WorkIT.DataAccess.Address' in Assembly 'DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
>>>
>>>   at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
>>>
>>>   at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
>>>
>>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
>>>
>>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
>>>
>>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
>>>
>>>   at System.Runtime.Serialization.Formatters.Bina...'
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform