Home All Groups Group Topic Archive Search About

Moving Chat sample from Http to Ipc channel...

Author
3 Jul 2006 12:23 PM
Nathan Baulch
After failing to a solution in the remoting newsgroup, I've decided to post
here also.

I'm trying to convert the "Remoted Events (Chat) Sample"
(http://support.microsoft.com/Default.aspx?id=312114) from Http to Ipc
channels in .net V2.
Since everything is setup in config files, I have only changed the server
and client app.config files (see below).
Unfortunately I'm getting a RemotingException in the client with the
message: "Failed to connect to an IPC Port: The system cannot find the file
specified.".
Is anybody able to shed any light on this? I've used IpcChannel before, but
never set them up from config files.


Server:

<configuration>
  <system.runtime.remoting>
    <application>
      <service>
        <wellknown mode="Singleton" type="ChatCoordinator, ChatCoordinator"
objectUri="Chat" />
      </service>
      <channels>
        <!--<channel ref="http" port="8080" />-->
        <channel ref="ipc" portname="ChatCentral">
          <clientProviders>
            <formatter ref="binary" typeFilterLevel="Full" />
          </clientProviders>
          <serverProviders>
            <formatter ref="binary" typeFilterLevel="Full" />
          </serverProviders>
        </channel>
      </channels>
    </application>
  </system.runtime.remoting>
</configuration>


Client:

<configuration>
  <system.runtime.remoting>
    <application>
      <client>
        <!--<wellknown type="ChatCoordinator, ChatCoordinator"
url="http://localhost:8080/Chat" />-->
        <wellknown type="ChatCoordinator, ChatCoordinator"
url="ipc://ChatCentral/Chat" />
      </client>
      <channels>
        <!--<channel ref="http" port="0" />-->
        <channel ref="ipc" portname="ChatClient">
          <clientProviders>
            <formatter ref="binary" typeFilterLevel="Full" />
          </clientProviders>
          <serverProviders>
            <formatter ref="binary" typeFilterLevel="Full" />
          </serverProviders>
        </channel>
      </channels>
    </application>
  </system.runtime.remoting>
</configuration>



Nathan

Author
4 Jul 2006 9:26 AM
GhostInAK
Hello Nathan,

I don't know anything about the M$ example.  However, a chat client that
communicated via IPC would be useless. 
Your best bet is http or a binary channel of some kind.

-Boo

Show quote
> After failing to a solution in the remoting newsgroup, I've decided to
> post here also.
>
> I'm trying to convert the "Remoted Events (Chat) Sample"
> (http://support.microsoft.com/Default.aspx?id=312114) from Http to Ipc
> channels in .net V2.
> Since everything is setup in config files, I have only changed the
> server
> and client app.config files (see below).
> Unfortunately I'm getting a RemotingException in the client with the
> message: "Failed to connect to an IPC Port: The system cannot find the
> file
> specified.".
> Is anybody able to shed any light on this? I've used IpcChannel
> before, but
> never set them up from config files.
> Server:
>
> <configuration>
> <system.runtime.remoting>
> <application>
> <service>
> <wellknown mode="Singleton" type="ChatCoordinator,
> ChatCoordinator"
> objectUri="Chat" />
> </service>
> <channels>
> <!--<channel ref="http" port="8080" />-->
> <channel ref="ipc" portname="ChatCentral">
> <clientProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </clientProviders>
> <serverProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </serverProviders>
> </channel>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
> Client:
>
> <configuration>
> <system.runtime.remoting>
> <application>
> <client>
> <!--<wellknown type="ChatCoordinator, ChatCoordinator"
> url="http://localhost:8080/Chat" />-->
> <wellknown type="ChatCoordinator, ChatCoordinator"
> url="ipc://ChatCentral/Chat" />
> </client>
> <channels>
> <!--<channel ref="http" port="0" />-->
> <channel ref="ipc" portname="ChatClient">
> <clientProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </clientProviders>
> <serverProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </serverProviders>
> </channel>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
> Nathan
>
Author
4 Jul 2006 1:25 PM
Nathan Baulch
> a chat client that communicated via IPC would be useless.

I realise that, I'm only using it as a publicly available working example of
remoting with events (bidirectional).
What I eventually want to do is expose the application object of my program
(which has lots of events) via IPC for automation by third parties.
Author
25 Jul 2006 3:43 AM
Nathan Baulch
> Is anybody able to shed any light on this? I've used IpcChannel before,
> but never set them up from config files.

For the benefit of the group, the problem was that the portName attribute in
the client channel has a capital N.

AddThis Social Bookmark Button