tags:

views:

310

answers:

1

Hi,

I am trying to create a very simple example of remoting which isn't working. I start the host and when I start client, it says "requested service not found"

Parts of My Application are:

  1. Remoting Object : MarshalByRefObject
  2. ComponentHost
  3. Client

You can download my project from here It has been 2 days and I am going crazy. Requested if someone can tell that where am I wrong?

A: 

Questions in SO normally contain a summary of the code that poses problem, not a link to a complete project.

As you're new, I have taken a look anyway.

I could reproduce the problem, but not being a .NET remoting expert, I do not know what should be fixed in the part of the config. An internet search returns a lot of samples that use the tag for registration.

If you replace your client config by:

        <client>
            <wellknown
            type="MyRemoteObject.Greetings,MyRemoteObject"
            url="tcp://localhost:8737/ComponentHost" />
        </client>        

and the server config by:

  <service>
      <wellknown
      mode="Singleton"
      type="MyRemoteObject.Greetings,MyRemoteObject"
      objectUri="ComponentHost"/>
  </service>

It works fine.

Timores
Thanks for the reply. But this would make my instance singleton where as I wanted it to be clientActivated.I did manage to resolve the issue with hit-and-trials by modifying client app.config from:<client url="tcp://localhost:8000/ComponentHost"> to <client url="tcp://localhost:8000/">Which resolved the issue. But in all samples I have read that applicationName as mentioned in App.config of server should be appended to URL in client's app.config.I didn't get how it got fixed and eager to know the logic behind this fix.Please help in understanding this!
enableDeepak