locked
serviceforwarder works on two nodes locally, but not across machines RRS feed

  • Question

  • I'm having trouble getting the ServiceForwarder to work across machines. It works fine when I run two nodes on different ports on the same machine, but when I switch one of the nodes to a remote machine connected to the same router  it stops working. I'm even using the direct URI. Is there a security setting, or something else that I need to check?

    Thursday, June 21, 2007 5:47 PM

Answers

  • there is no way around the firewall issue, but you dont need to disable security. If your machines use WorkGroups or are in a domain, if you login as a user that is listed in both nodes, in the security file, then you will be fine.
    Friday, June 22, 2007 2:56 AM

All replies

  • I sort of resolved this, but its not such a great solution. I disabled the firewalls on both machines and disabled security on the remote dss node. Is there a less vulnerable way to do this?
    Thursday, June 21, 2007 6:30 PM
  • there is no way around the firewall issue, but you dont need to disable security. If your machines use WorkGroups or are in a domain, if you login as a user that is listed in both nodes, in the security file, then you will be fine.
    Friday, June 22, 2007 2:56 AM
  • Hi Josh

    I’m trying to do what you did (using service forwarder across nodes) but I can’t make it work, I have a sample code of my application can you please help me.

     

    Many thanks

     

    I have a simple service (SimpleService) which is hosted by dssHost in p:50000 t:50001 in the local machine and in the second application I'm hosting a DSS node with DssEnvironment and I am passing Simple Service manifest, so I have a instance of SimpleService on each node, so the proxy for this service should be loaded on each node:

     

    Code Block

            static int Main()

            {

                int _status = 1;

    DssEnvironment.Initialize(40000, 40001,

    @"C:\Documents and Settings\matt.majedi\My Documents\Visual Studio 2005\Projects\Robotic\SampleServices\SimpleService\SimpleService\SimpleService.manifest.xml");

                Arbiter.Activate(DssEnvironment.TaskQueue, Arbiter.FromIteratorHandler(RunTask));

                DssEnvironment.WaitForShutdown();

                return _status;

            }

            static IEnumerator<ITask> RunTask()

            {

                //rebuild contract directory

                cd.ContractDirectoryPort _contractDir = DssEnvironment.ServiceForwarder<cd.ContractDirectoryPort>(new Uri("dssp.tcp://tic-test-matt:40001/controlpanel"));

                yield return Arbiter.Choice(

                     _contractDir.Get(),

                     delegate(cd.State res) {System.Windows.Forms.MessageBox.Show("State Come"); },

                     delegate(Fault f) { System.Windows.Forms.MessageBox.Show(f.Reason[0].Value); }

                 );

     

                ss.SimpleOperations ssPort = DssEnvironment.ServiceForwarder<ss.SimpleOperations>(new Uri("dssp.tcp://tic-test-matt:50001/simpleservice"));

     

                //yield break;

                string s = "No result";

                yield return Arbiter.Choice(

                     ssPort.Get(),

                     delegate(ss.SimpleState res) {

                         s = "Name is: " + res.Name;

                     },

                     delegate(Fault f) {

                         s = "Remote fault " + f.Reason[0].Value;

                     }

                 );

                System.Windows.Forms.MessageBox.Show(s);

            }

     

     

     

     

     

    My application always stock in yield return, not even Fault happen. and If I try to use service forwarder to access http://tic-test-matt:50001/simpleservice I will have  "Failed outbound message" .

     

    Any help would be much appreciated.

     

     

     

     

    Thursday, November 15, 2007 3:50 PM
  • I'm really sorry but I managed to sort it out. I just disable authentication on my first node on http://localhost:50000/security/manager and its is working now.

     

    Thanks

     

    Thursday, November 15, 2007 5:06 PM