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. .NET Remoting Reference

.NET Remoting Reference

Scheduled Pinned Locked Moved C#
questioncsharptutorial
6 Posts 2 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.
  • W Offline
    W Offline
    Wender Oliveira
    wrote on last edited by
    #1

    I have a class Client (client.cs) that is serializable and a class RemoteMethods (MarshalByRefObject) with a method public static Client getClient(int clientID). Ok... now the question... how to add a "remote" reference to Client class. I want to access this class without need to have the Client's dll on my client side I want to access this referencing it on another machine... This is possible? Regards.... Wender Oliveira .NET Programmer

    A 1 Reply Last reply
    0
    • W Wender Oliveira

      I have a class Client (client.cs) that is serializable and a class RemoteMethods (MarshalByRefObject) with a method public static Client getClient(int clientID). Ok... now the question... how to add a "remote" reference to Client class. I want to access this class without need to have the Client's dll on my client side I want to access this referencing it on another machine... This is possible? Regards.... Wender Oliveira .NET Programmer

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      Please clearify... Wender Oliveira wrote: without need to have the Client's dll on my client side. And another thing Wender Oliveira wrote: how to add a "remote" reference to Client class If you are trying to reference something in the client assembly from the server assembly your design is not right. That class must be in the shared assembly. :confused:

      W 1 Reply Last reply
      0
      • A Alex Korchemniy

        Please clearify... Wender Oliveira wrote: without need to have the Client's dll on my client side. And another thing Wender Oliveira wrote: how to add a "remote" reference to Client class If you are trying to reference something in the client assembly from the server assembly your design is not right. That class must be in the shared assembly. :confused:

        W Offline
        W Offline
        Wender Oliveira
        wrote on last edited by
        #3

        Sorry... lol I want to make a new instance of a class that exists only on my remote server... I don't want to copy the dll that has this class inside to my client server... Wender Oliveira .NET Programmer

        A 1 Reply Last reply
        0
        • W Wender Oliveira

          Sorry... lol I want to make a new instance of a class that exists only on my remote server... I don't want to copy the dll that has this class inside to my client server... Wender Oliveira .NET Programmer

          A Offline
          A Offline
          Alex Korchemniy
          wrote on last edited by
          #4

          OK. That's more like it. :) What you do is you create a library that has that class you want to use in both the client and the server. You then add a reference to the library in both the server and the client. Another thing. If you want to have the implementation for the code hidden you can create an interface that matches the code (its a good practice to come up with the interface before hand :)) and put the interface in the shared library.

          W 1 Reply Last reply
          0
          • A Alex Korchemniy

            OK. That's more like it. :) What you do is you create a library that has that class you want to use in both the client and the server. You then add a reference to the library in both the server and the client. Another thing. If you want to have the implementation for the code hidden you can create an interface that matches the code (its a good practice to come up with the interface before hand :)) and put the interface in the shared library.

            W Offline
            W Offline
            Wender Oliveira
            wrote on last edited by
            #5

            Thanks Alex... This is what I want to know but not what I want to read. I'm doing like you said and I was hopeful to find another way... like webservice... you just add a web reference and all those classes can be found by vs.net ... Thanks again... Wender Oliveira .NET Programmer

            A 1 Reply Last reply
            0
            • W Wender Oliveira

              Thanks Alex... This is what I want to know but not what I want to read. I'm doing like you said and I was hopeful to find another way... like webservice... you just add a web reference and all those classes can be found by vs.net ... Thanks again... Wender Oliveira .NET Programmer

              A Offline
              A Offline
              Alex Korchemniy
              wrote on last edited by
              #6

              Yeah WS work differently. They use WSDL to describe how the WS works. There is a tool call soapsuds.exe if you are hosting your remoting object using HTTP and Soap you can use it to generate an interface assembly. I've ran across this when getting my MCAD but you'll have to look into it more. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfsoapsudsutilitysoapsudsexe.asp[^] This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy

              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