none
.net remoting deserialize error after upgrading from .net 2.0 to .net 4.5 RRS feed

  • Question

  • I have an existing .net remoting project for interprocess communication that allows a service running on a computer to interact with the user space. Everything works fine in .net 3.5 sp1 but when we updated to .net 4.5 I'm getting deserialization errors.

    the error is as follows:

    Unable to find assembly 'xxxx.xxx, Version=5.6.1.0, Culture=neutral, PublicKeyToken=null'.
    Inner Exception: 
    Stack Trace: 
    Server stack trace: 
       at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
       at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
       at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
       at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
       at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
       at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
       at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
       at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

    ...

    The assembly in question contains the serializable class that is returned by the call. The assembly file, server, and client files are all in the same folder and the server and client use the same assembly file for serialization and deserialization.

    I've done a lot of searching on the web over the last few days and have not been able to find a resolution.

    The client in this case, where the deserializing is failing, is a service being run from a dll. I say this only because I've seen a lot of talk about making sure the config file is correctly set but in this case I do not have a config file.

    Does anyone have any idea of what changes may have occurred with .net 4.5 that could lead to this? I'm getting close to my deadline and really need to find a resolution!

    Any help that everyone can give would be greatly appreciated at this point.

    In a perfect world I'd switch over to WCF, but that is not an option at this time due to time constraints.

    -John

    Tuesday, February 12, 2013 9:30 PM

All replies