We are using distributed Lucene.net and we have Master Index Server which takes responsibility of distributing the index searching to multiple Index Servers by calling the remote method Search(...) of the Index Server. It is when the Master Server de-serializing the response message from the Index Server, we got the following SerializationException.
The Search method is overloaded: TopDocs docs = searchable.Search(weight, filter, nDocs); TopFieldDocs fDocs = searchable.Search(weight, filter, nDocs, sort); TopDocs is the parent class of TopFieldDocs. The difference is that the second method takes an extra parameters of type Sort and returns the child type TopFieldDocs of TopDocs. The first method works properly. Tracing shows that result on the IndexServer is properly generated for the second method. Any one knows the issue or how to debug the issue? System.Runtime.Serialization.SerializationException: Binary stream '99' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization. Server stack trace: 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.Deseriali ze(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMe ssage(Stream inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding) at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMe ssage(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 Lucene.Net.Search.Searchable.Search(Weight weight, Filter filter, Int32 n, Sort sort) at Lucene.Net.Search.MultiSearcherThread.Run() in C:\Dev\TrueLocal\TrueLocal.Lucene.Net-2.0.0\Search\ParallelMultiSearcher .cs:line 278
