You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am upgrading our app from CSLA 3.8 to 5.5.3 (6 is too big a change) I have also switched from Framework to .Net 7.
When data is assigned to the DataSource of a windows forms BindingSource I get the error below.
Every time the bindings are evaluated I get a similar error.
Version and Platform
CSLA version: 5.5.3
OS: Windows
Platform: WinForms
Code that Fails
Code fails at line 255 in FieldData.cs
SerializationInfo childInfo = formatter.SerializeObject((IMobileObject)_data);
This discussion was converted from issue #3369 on October 27, 2023 19:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I am upgrading our app from CSLA 3.8 to 5.5.3 (6 is too big a change) I have also switched from Framework to .Net 7.
When data is assigned to the DataSource of a windows forms BindingSource I get the error below.
Every time the bindings are evaluated I get a similar error.
Version and Platform
CSLA version: 5.5.3
OS: Windows
Platform: WinForms
Code that Fails
Code fails at line 255 in FieldData.cs
SerializationInfo childInfo = formatter.SerializeObject((IMobileObject)_data);
Stack Trace or Exception Detail
System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'Csla.Serialization.Mobile.IMobileObject'.'
Csla.dll!Csla.Core.FieldManager.FieldData.Csla.Serialization.Mobile.IMobileObject.GetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter) Unknown
Csla.dll!Csla.Serialization.Mobile.MobileFormatter.SerializeObject(object obj) Unknown
Csla.dll!Csla.Core.MobileList<Csla.Core.FieldManager.IFieldData>.OnGetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter) Unknown
Csla.dll!Csla.Core.MobileList<System.__Canon>.Csla.Serialization.Mobile.IMobileObject.GetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter) Unknown
Csla.dll!Csla.Serialization.Mobile.MobileFormatter.SerializeObject(object obj) Unknown
Csla.dll!Csla.Serialization.Mobile.MobileFormatter.SerializeAsDTO(object graph) Unknown
Csla.dll!Csla.Serialization.Mobile.MobileFormatter.SerializeToDTO(object obj) Unknown
Csla.dll!Csla.Serialization.Mobile.MobileFormatter.Serialize(System.IO.Stream serializationStream, object graph) Unknown
Csla.dll!Csla.Core.FieldManager.FieldDataManager.Csla.Core.IUndoableObject.CopyState(int parentEditLevel, bool parentBindingEdit) Unknown
Csla.dll!Csla.Core.UndoableBase.CopyState(int parentEditLevel) Unknown
Csla.dll!Csla.Core.BusinessBase.BeginEdit() Unknown
Csla.dll!Csla.Core.BusinessBase.System.ComponentModel.IEditableObject.BeginEdit() Unknown
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.OnCurrentChanged(System.EventArgs e) Unknown
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.ChangeRecordState(int newPosition, bool validating, bool endCurrentEdit, bool firePositionChange, bool pullData) Unknown
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.List_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e) Unknown
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs e) Unknown
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.ResetBindings(bool metadataChanged) Unknown
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.SetList(System.Collections.IList list, bool metaDataChanged, bool applySortAndFilter) Unknown
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.ResetList() Unknown
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.DataSource.set(object value) Unknown
Additional context
An collection of the following models are being loaded:
using System;
using Csla;
using CXDoc.Business.Data;
using Oracle.ManagedDataAccess.Client;
using CXDoc.CanAm;
using CXDoc.Utility;
namespace CXDoc.Business
{
[Serializable]
public class Attribute : CXBusinessBase, IComparable
{
#region Business Methods
}
Beta Was this translation helpful? Give feedback.
All reactions