.NET Binary Remoting

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top