Brian Vallelunga
8/21/2004 2:44:00 AM
I hope someone can help me. I'm trying to implement a remote object and
subscribe to an event on it. I'm using an event wrapper as suggested in Ingo
Rammer's book so that I can use interfaces with remoting. My problem is that
my server object's event never gets subscribed to successfully. The wrapper
seems to work fine, but when I have the event fire via another remote
method, no listeners are subscribed.
I have a suspicion what the problem is. When I first tried to run the code
given in the book, I received a security error. The error was the change to
the serialization made in the 1.1 version of the framework. On my remoting
server, I made the changes to the configuration file to specify the
TypeFilterLevel to full. I no longer receive the error. However, I'm unsure
if I'm supposed to set this setting on the client as well. I was using
config files on the server, but code for the remoting client. The code I was
using for the client was very simple:
TcpClientChannel tcpChannel = new TcpClientChannel();
ChannelServices.RegisterChannel(tcpChannel);
IRemoteObject obj = (IRemoteObject )Activator.GetObject(
typeof(IRemoteObject ), "tcp://localhost:8085/IRemoteObject .rem" );
Do I need to specify the TypeFilterLevel on the client's end? If so, how do
I do this in code? I've seen some examples that use TcpChannel instead of
TcpClientChannel and I tried to implement it that way, but when I did, I get
an error stating that the channel is already registered on the computer. I'm
not quite sure what to do.
Thanks for any help.
Brian