Strange issue: Soap Serializer does not support serializing Generic Types

Strange issue: Soap Serializer does not support serializing Generic Types

Old forum URL: forums.lhotka.net/forums/t/6951.aspx


rsoni posted on Friday, May 15, 2009

I am getting very strange problem on server remoting host. I am using Csla.DataPortalClient.RemotingProxy. This all setup was working perfectly fine. But suddenly it started giving below error. There are no changes in the code. This use to work earlier perfectly. All setups and configuration are correct. When I configure those on a different server this works fine. But on our staging server this stopped working without any known reason. Does any one encounter same problem earlier? Please help we are in trouble.


Exception details:

DataPortal.Fetch failed (System.Runtime.Serialization.SerializationException: Soap Serializer does not support serializing Generic Types : System.Collections.Generic.List`1[System.String].

Server stack trace:
at System.Runtime.Serialization.Formatters.Soap.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Soap.ObjectWriter.Serialize(Object graph, Header[] inHeaders, SoapWriter serWriter)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers)
at System.Runtime.Remoting.Channels.CoreChannel.SerializeSoapMessage(IMessage msg, Stream outputStream, Boolean includeVersions)
at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SerializeMessage(IMethodCallMessage mcm, ITransportHeaders& headers, Stream& stream)
at System.Runtime.Remoting.Channels.SoapClientFormatterSink.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)
at Csla.Server.IDataPortalServer.Update(Object obj, DataPortalContext context)
at Csla.DataPortalClient.RemotingProxy.Update(Object obj, DataPortalContext context)
at Csla.DataPortal.Update(Object obj, Boolean forceLocal)
at Csla.DataPortal.Update[T](T obj, Boolean forceLocal)
at Csla.DataPortal.Execute[T](T obj)
at Dataform.IDS.BO.Security.UserPermissionCommand.GetUserPermission(String connectionString, Guid organizationGuid, Int32 userId)
at Dataform.IDS.BO.Security.IDSIdentity.DataPortal_Fetch(Criteria criteria))

RockfordLhotka replied on Friday, May 15, 2009

Somehow you have remoting configured to use the Soap serializer instead of the BinaryFormatter. That is probably not good.

While I think technically Microsoft still supports the SoapFormatter, I suspect it has fallen so far out of use that it is no longer completely compatible with the BinaryFormatter - and thus with modern .NET type concepts like generics.

Copyright (c) Marimer LLC