all groups > dotnet remoting > december 2005 >
You're in the

dotnet remoting

group:

Remoting Configuration Issue


Remoting Configuration Issue Robert Reineri
12/19/2005 5:23:00 PM
dotnet remoting:
We have a service where we configure remoting via the configuration file. My
problem is this. This service has, until now, only provided services to
client applications. Now, the service is going to be a client itself (it
needs to remote to yet another service). I am trying to define two tcp
channels:

<channels>
<!-- External clients use tcp on port 7777 -->
<channel ref="tcp" port="7777" >
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>

<!-- Internal clients use http on port 7778 -->
<channel ref="http" port="7778" >
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>

<!-- Support added for Centralized Cache -->
<channel ref="tcp" port="9998">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>

When I do this in the config file, and try to start the service, it
complains that the TCP channel is defined twice. It seems to me that since
they are using separate ports, why should this make any difference? This
third channel will be used for the service to connect to yet another
service, but this time as a client.

I think perhaps I am missing the whole point of these channels, and just
don't have a good grasp of the whole process as remoting is new to me (this
is a legacy app I am working on).

Here is the exact error message I get:
System.Runtime.Remoting.RemotingException: Remoting configuration failed
with the exception System.Runtime.Remoting.RemotingException: The channel
tcp is already registered.

at
System.Runtime.Remoting.Channels.ChannelServices.RegisterChannelInternal(IChannel
chnl)

at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(IChannel
chnl)

at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData
configData)

at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData
configData).

at
System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData
configData)

at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename)

any help would be greatly appreciated. Please reply via newsgroup.

Thank you very much for any assistance.

Robert Reineri
First National Bank of Marin

RE: Remoting Configuration Issue Marc
1/12/2006 5:47:04 AM
Robert,

The channel "tcp" is already registered. By not specifically naming tcp
channels to unique names you are running into the error. Tcp channel has
default name of "tcp". The return error has the user thinking a second Tcp
channel can not be registered.

See link for full explanation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconchannels.asp

- Marc


[quoted text, click to view]
Re: Remoting Configuration Issue ThunderMusic
1/12/2006 3:52:57 PM
hi,
could you give more detail on this please? because I have the same problem
and don't know how to solve it.
What should I put in my <channel> line?

mine is : <channel ref="tcp" port="8000"> </channel>

thanks

ThunderMusic

[quoted text, click to view]

Re: Remoting Configuration Issue Marc
1/17/2006 12:27:02 PM
I don't know if attribute of name can be added to channel node to uniquely
identify channel in the config file. Chances are there is a way otherwise
there would be a limit of 1 tcp or http server listener per app domain.

For the code it would be as follows to name the channel:

IDictionary prop = new Hashtable();
prop["name"] = "http1";
prop["port"] = "9001";
ChannelServices.RegisterChannel(new HttpChannel(prop, null, null));

- Marc


[quoted text, click to view]
Re: Remoting Configuration Issue Ramu Nallamothu
1/17/2006 4:03:57 PM
Hi Robert,

Channels registered to the same application domain must be uniquely named
within the domain. TcpChannel objects have the default name "tcp" , whereas
HttpChannel objects take the default name "http". You need to change these
default names if you want to register more than one TcpChannel or
HttpChannel in a single doman.

For example, you could give names to channel objects in your configuration
file as follows:

<channel ref="tcp" port="7777" name="ChannelA">

....
</channel>


<channel ref="tcp" port="9998" name="ChannelB">

....
</channel>


Hope this helps,
Ramu Nallamothu









[quoted text, click to view]

Re: Remoting Configuration Issue porko
3/26/2006 2:46:03 PM
Ramu,

I was having the same problem. This seems to have solved it. Thanks for
your straight forward answer!

- Porko

[quoted text, click to view]
AddThis Social Bookmark Button