.NET Binary Remoting

  • Thread starter Thread starter Jeremiah Gowdy
  • Start date Start date
J

Jeremiah Gowdy

I am interested in deploying .NET binary remoting in a few applications, and
I have learned how to do remoting via interfaces so that I don't have to
share the actual class code with the client (although the interface
definition has to remain in a shared DLL). Now I am trying to figure out
how I can pass serialized objects without putting those objects in a shared
DLL between the applications. I'm wondering if there's a way to do binary
serialization with objects based on their structure / method signature
rather than their AppDomain path. It seems that when you do remoting via
SOAP, the object types aren't so strict, but with binary remoting the only
way objects can be shared is if their definition is shared in the same
assembly / DLL.

Basically I'm wondering if there's a way to use .NET's binary serialization
without including the assembly, or allowing me to cast it to match the same
object compiled into both assemblies rather than having a shared assembly.
 
Jeremiah,

Without a shared assembly, no, there isn't a way to do this. You have
to have a type definition accessible somewhere to the client (whether it be
a concrete type or an interface) to use when returning values to you (or
propogating them to the service).

If you are using .NET 3.0, then you might want to consider Windows
Communication Foundation, as it will allow you to not have to use a shared
assembly for type definitions. Basically, you can create proxies in your
client, as well as types, and inform the framework how you want the values
mapped to the instances of the types. As long as you adhere to the
contract, and not the specific type definition, it will work.
 
Back
Top