CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Serialization issue with .NET 4.0 and .NET 4.5 beta

rated by 0 users
Not Answered This post has 0 verified answers | 4 Replies | 3 Followers

Not Ranked
2 Posts
robert.oh. posted on Tue, Mar 20 2012 9:06 AM

Hello guys,

we're using CSLA 4.3 in a distributed environment and encountered the following issues with the usage of the data portal:

There was an error while trying to deserialize parameter http://ws.lhotka.net/WcfDataPortal:request. The InnerException message was 'Member 'm_identity' was not found.'.

After some investigation we figured out that this is caused by the fact that the server was running on a machine that had a .NET 4.5 beta installed and the client was running with a 'pure' .NET 4.0 installation; the same is true when the server is running on 'pure' .NET 4.0 and the client on a .NET 4.5 beta machine.

Everything works fine if both machines have exactly the same .NET runtime version / installation; either two times 'pure' .NET 4.0 or two times .NET 4.5 beta.

There are some changes in the serializer in the 'patched' .NET 4.0 runtime (which comes with the installation of the .NET 4.5 beta installation).

Is this a known issue?

Thanks for information and help!

Regards,

robert.oh.

All Replies

Top 10 Contributor
9,270 Posts

This wouldn't be the first time Microsoft has changed the serialization format out from under us.

But it would be the first time they were incompatible since the .NET 1.0 to 1.1 fiasco.

I suggest you do two things:

  1. Submit a bug to Microsoft via connect, so they know they are potentially repeating the 1.0 to 1.1 mess
  2. Try using the new binary reader/writer Sergey created for CSLA 4.3 - they probably won't have this issue because it is CSLA code doing the low-level creation of the byte stream; no guarantees, but it might be a workaround

 

Rocky

Top 10 Contributor
9,270 Posts

Oh wait, sorry, my workaround isn't available if the client is .NET :(

So I don't have a real workaround to suggest. Microsoft must have changed how the NDCS works in 4.5 (I'm assuming you are using WcfProxy), and to me that sounds like a bug in .NET.

Rocky

Not Ranked
2 Posts

Hello Rocky,

thanks for the fast answers.

You're right, we're using the WcfProxy and we will create a Microsoft bug in connect.

Thanks,

robert.oh.

Not Ranked
6 Posts
Bernhard replied on Thu, Mar 22 2012 10:51 AM

Connect issue is here:

https://connect.microsoft.com/VisualStudio/feedback/details/732591/serialization-issue-with-net-4-0-and-net-4-5-beta

Page 1 of 1 (5 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems