Hi there,
I get a
System.Runtime.Serialization.SerializationException
Because of security restrictions, the type
System.Runtime.Remoting.ObjRef cannot be accessed.
exception when I try to the object from the client to the
server.
I create my Client like this:
tcc = new TcpClientChannel();
ChannelServices.RegisterChannel(tcc);
remoteInterface = (IRemoteServer.RemoteInterface)
Activator.GetObject(typeof
(IRemoteServer.RemoteInterface), "tcp://localhost:8000/Rem
oteClass");
The server is created like this
hts = new TcpServerChannel(8000);
ChannelServices.RegisterChannel(hts);
RemotingConfiguration.RegisterWellKnownServiceType(typeof
(BankDetailsClassLibrary), "RemoteClass",
WellKnownObjectMode.Singleton);
It works until I try to pass the object from client to
server. Is there a workaround?
Thanks a lot
Chris
Kumar Gaurav Khanna [.NET MVP] - 31 Aug 2003 20:44 GMT
Hi!
The object that you are trying to pass from the client to the server, is it
implemented in the client, and marked serializable?
For you to pass it to the server, the above two conditions must hold true.

Signature
Regards,
Gaurav Khanna
----------------------------------------------------------------------------
----------------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
> Hi there,
> I get a
[quoted text clipped - 29 lines]
>
> Chris