Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DotNet Remoting------------->Urgent

DotNet Remoting------------->Urgent

Scheduled Pinned Locked Moved C#
csharpsysadminquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    munishk
    wrote on last edited by
    #1

    Hi, I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question: When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed. Favourite quote: In youth we learn, In age we understand.

    P J H 3 Replies Last reply
    0
    • M munishk

      Hi, I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question: When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed. Favourite quote: In youth we learn, In age we understand.

      P Offline
      P Offline
      partyganger
      wrote on last edited by
      #2

      Maybe you can use UDDI? We use it to find a webservice..

      1 Reply Last reply
      0
      • M munishk

        Hi, I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question: When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed. Favourite quote: In youth we learn, In age we understand.

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        It's recommended you do not share the actual remotable library. Use interfaces instead, and share only the interface. For example

        // server side code only
        public class MyRemotableDll : MarshalByRefObject, IMyRemotable
        {
        void SomeMethod()
        {
        }
        }

        // server side code, in some other class
        MyRemotableDll obj = new MyRemotableDll();
        RemotingServices.Marshal(obj, "obj.rem");

        // shared interface, distribute to both client and server
        public interface IMyRemotable
        {
        void SomeMethod;
        }

        // client side code
        IMyRemotable theRemoteObj = (IMyRemotable)RemotingServices.Connect(typeof(IMyRemotable), "http://localhost:4030/obj.rem");
        theRemoteObj.SomeMethod();

        Hope that helps. --------------------------- He who knows that enough is enough will always have enough. -Lao Tsu

        M 1 Reply Last reply
        0
        • M munishk

          Hi, I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question: When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed. Favourite quote: In youth we learn, In age we understand.

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          In addition to what Judah said (which is the preferred way when you have control over development like this), you can also use soapsuds.exe from the SDK to generate a client proxy (for cases when you can't dictate how the remote object is developed or deployed).

          Microsoft MVP, Visual C# My Articles

          1 Reply Last reply
          0
          • J Judah Gabriel Himango

            It's recommended you do not share the actual remotable library. Use interfaces instead, and share only the interface. For example

            // server side code only
            public class MyRemotableDll : MarshalByRefObject, IMyRemotable
            {
            void SomeMethod()
            {
            }
            }

            // server side code, in some other class
            MyRemotableDll obj = new MyRemotableDll();
            RemotingServices.Marshal(obj, "obj.rem");

            // shared interface, distribute to both client and server
            public interface IMyRemotable
            {
            void SomeMethod;
            }

            // client side code
            IMyRemotable theRemoteObj = (IMyRemotable)RemotingServices.Connect(typeof(IMyRemotable), "http://localhost:4030/obj.rem");
            theRemoteObj.SomeMethod();

            Hope that helps. --------------------------- He who knows that enough is enough will always have enough. -Lao Tsu

            M Offline
            M Offline
            munishk
            wrote on last edited by
            #5

            Judah, Thanks for the nice solution. I have further question in your solution and it may sound stupid but help me. When I am using interfaces on client side how the call reaches to particular piece on server where this interface is implemented. I mean to say that this interface may have been implemented in different different areas. I know that to reach particular piece we do registration of server and give right address (tcp/http) on client side but my question is interface is just an abstract thing. How the call from client actually reaches to server. Please help.. Favourite quote: In youth we learn, In age we understand.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups