Re: Channel relationship to RegisterWellKnownServiceType()
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 08/28/04
- Previous message: Alex Maghen: "Channel relationship to RegisterWellKnownServiceType()"
- In reply to: Alex Maghen: "Channel relationship to RegisterWellKnownServiceType()"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 22:55:17 -0700
A channel is a communication mechanism. You can register a well known type
without having a registered channel, but then you'll have no way to
communicate with it. You won't get a compile error or even a runtime error
on the server side, but when a client tries to connect to it an exception
will be thrown such as:
System.Runtime.Remoting.RemotingException: This remoting proxy has no
channel sink which means either the server has no registered server channels
that are listening, or this application has no suitable client channel to
talk to the server.
The Application Domain is the "container" for both. An App domain must have
a channel registered in order to communicate with other App domains. Well
known objects are objects that are accessible in an App domain via a known
URI. So in your typical URL:
http://myserver:port/MyObjectURI
the first part, http://myserver:port are strictly communication related -
protocol, destination server, and port (which will indirectly identify the
App domain) and the last part, MyObjectURI, is the URI for your remotely
available object. So without a registered channel your App domain cannot
communicate outside of its boundaries.
Check out this link:
Remoting Architecture
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconnetremotingarchitecture.asp
Thanks,
Sam
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "Alex Maghen" <AlexMaghen@discussions.microsoft.com> wrote in message news:D3F89528-0123-4053-B497-B293EBDDCC64@microsoft.com... > I'm confused about the relationship between Channels and Registered Well > Known Service Types. > > Many of the sampes I've seen for Remoting server applications show the > following code for starting up the availability of a class to other > applications: > > HttpChannel channel = new HttpChannel(8100); > ChannelServices.RegisterChannel(channel); > > RemotingConfiguration.RegisterWellKnownServiceType( > typeof(ExposedClass), > "ExposedClass.soap", > WellKnownObjectMode.Singleton); > > The first 2 lines create and "Register" a Channel. The NEXT line, Registers > a Well Kknow Service Type. But that RegisterWellKnownServiceType() call > doesn't take the newly created Channel as a parameter or anything. So how are > they connected to one another? If you've created a Channel on port 8100, what > does that have to do with the registration of a Well KNown Service Type? > > Alex
- Previous message: Alex Maghen: "Channel relationship to RegisterWellKnownServiceType()"
- In reply to: Alex Maghen: "Channel relationship to RegisterWellKnownServiceType()"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|