oz_ko
10-28-2006, 01:00 AM
Hi all,
I'm having some problems passing an object to a remote service and getting a
SerializationException "Unable to find assembly" (the client assembly).
Everything is done through interfaces so I don't know why this should be the case. I have three projects: Interfaces, Client, and Server.
There should be no dependency on the client assembly in the server so I don't know why it would be looking for it. Any ideas?
Interfaces:
namespace Interfaces
{
public interface IHelloSayer
{
String GetString();
}
public interface IServer
{
String SayHello(IHelloSayer helloSayer);
}
}
Client:
//HelloSayer is marked serializable
IHelloSayer helloSayer = (IHelloSayer) new HelloSayer("Hello");
IServer server = (IServer)ctx.GetObject("server");
String response = server.SayHello( helloSayer );
Server:
namespace Server
{
public class Server : IServer
{
public String SayHello(IHelloSayer helloSayer)
{
return helloSayer.GetString();
}
}
}
I'm having some problems passing an object to a remote service and getting a
SerializationException "Unable to find assembly" (the client assembly).
Everything is done through interfaces so I don't know why this should be the case. I have three projects: Interfaces, Client, and Server.
There should be no dependency on the client assembly in the server so I don't know why it would be looking for it. Any ideas?
Interfaces:
namespace Interfaces
{
public interface IHelloSayer
{
String GetString();
}
public interface IServer
{
String SayHello(IHelloSayer helloSayer);
}
}
Client:
//HelloSayer is marked serializable
IHelloSayer helloSayer = (IHelloSayer) new HelloSayer("Hello");
IServer server = (IServer)ctx.GetObject("server");
String response = server.SayHello( helloSayer );
Server:
namespace Server
{
public class Server : IServer
{
public String SayHello(IHelloSayer helloSayer)
{
return helloSayer.GetString();
}
}
}