سؤال

I've an issue with the .Net Remoting:

We have two application, a client and a server. The client can connect to the server and retrieve a configuration through .Net Remoting.

We have a setup which allows to deploy our software to the client. This setup obfuscate all our code, but we have an exclusion list (through namespace and DLL) which is excluding all class that are used to transfer data.

It appeared recently that since several months, we have a class in the configuration which is serialized, which is wrong. We saw that because we can't connect anymore from a debug client to a release(setup) server.

The issue is now: how can we find this class.

The exception is the following:

System.Runtime.Serialization.SerializationException occurred
  HResult=-2146233076
  Message=Cannot get the member '<.ctor>b__5'.
  Source=mscorlib
  StackTrace:
    Server stack trace: 
       at System.Reflection.MemberInfoSerializationHolder.GetRealObject(StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)
       at System.Runtime.Serialization.ObjectManager.DoFixups()

We tried to see with the deobfuscator what member it is but it seems that the exception isn't complete enough.

We have a lot of class, heritage, ... and we currently can't find which class is obfuscated but should not.

Since it's a binary serialization, we cannot see easily what is transfered between client and server.

What would be the better way(modifying the less the current code) to find which is the obfuscated class?

EDIT In addition of the dburner answer, I would like to say that I've removed my delegate and used direct method. Like this, this name is fixed and should not change depending of the compilation.

هل كانت مفيدة؟

المحلول

Take a look at this question Could we save delegates in a file (C#)

Delegates can be serialized and deserialized in the same application if you are lucky because they are pointers to function and a function can have diferent memory locations.

Because you are trying to deserialize your class in another application you are getting weird errors.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top