Re: Remote event subscription not working.
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 08/21/04
- Next message: Phil Jones: "Re: Serializable Exception - the constructor won't deserialize."
- Previous message: Sam Santiago: "Re: Serializable Exception - the constructor won't deserialize."
- In reply to: Brian Vallelunga: "Remote event subscription not working."
- Next in thread: Brian Vallelunga: "Re: Remote event subscription not working."
- Reply: Brian Vallelunga: "Re: Remote event subscription not working."
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 21 Aug 2004 01:01:49 -0700
Check out this remoting event example. I think you need to use delegates:
Chat Client
http://support.microsoft.com/default.aspx?scid=kb;en-us;312114
Ingo Rammer's website has an example of the security fix. Watch out for
case, it does matter:
http://www.thinktecture.com/Resources/RemotingFAQ/Changes2003.html
To register a channel programmatically check out the example at this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemruntimeremotingchannelschannelservicesclassregisterchanneltopic.asp
You can create channels with names. Use the constructor that allows you to
pass properties for the channel. The default name for a TCP channel is
'tcp' and for an HTTP channel is 'http' and you can only have one channel
with the same name within each AppDomain. So it sounds like you are trying
to create two channels without specifying a name. You could have one
created via the configuration file without a name and then trying to create
another programmatically and get this error.
Thanks,
Sam
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "Brian Vallelunga" <bgvallelunga@starpower.net> wrote in message news:OBkOFjyhEHA.644@tk2msftngp13.phx.gbl... > 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 > >
- Next message: Phil Jones: "Re: Serializable Exception - the constructor won't deserialize."
- Previous message: Sam Santiago: "Re: Serializable Exception - the constructor won't deserialize."
- In reply to: Brian Vallelunga: "Remote event subscription not working."
- Next in thread: Brian Vallelunga: "Re: Remote event subscription not working."
- Reply: Brian Vallelunga: "Re: Remote event subscription not working."
- Messages sorted by: [ date ] [ thread ]