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. Remoting - Watching remote objects...

Remoting - Watching remote objects...

Scheduled Pinned Locked Moved C#
questionhelp
3 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.
  • S Offline
    S Offline
    Shy Agam
    wrote on last edited by
    #1

    Hello experts, I use remoting in my application, but I can't tell if the remote object was really retrieved. When I use the Activator.GetObject() method it does not throw any exception, and if I set a watch for my retrieved object all I see are details regarding the proxy (i.e. the watch shows the details of a System.Runtime.Remoting.Proxies.__TransparentProxy object). And when I try to call a property inside of the remote object, I get a NullReferenceException. I know this might not be enough information to solve the NullReferenceException problem, but how can I make sure that I realy have a reference to my remote object, and how should one go about debugging remote objects? Thanks in advance, Shy.

    S M 2 Replies Last reply
    0
    • S Shy Agam

      Hello experts, I use remoting in my application, but I can't tell if the remote object was really retrieved. When I use the Activator.GetObject() method it does not throw any exception, and if I set a watch for my retrieved object all I see are details regarding the proxy (i.e. the watch shows the details of a System.Runtime.Remoting.Proxies.__TransparentProxy object). And when I try to call a property inside of the remote object, I get a NullReferenceException. I know this might not be enough information to solve the NullReferenceException problem, but how can I make sure that I realy have a reference to my remote object, and how should one go about debugging remote objects? Thanks in advance, Shy.

      S Offline
      S Offline
      Shy Agam
      wrote on last edited by
      #2

      OK... Solved my NullReferenceException problem, and my app works as expected... However, my question still stands... :) Thanks in advance, Shy.

      1 Reply Last reply
      0
      • S Shy Agam

        Hello experts, I use remoting in my application, but I can't tell if the remote object was really retrieved. When I use the Activator.GetObject() method it does not throw any exception, and if I set a watch for my retrieved object all I see are details regarding the proxy (i.e. the watch shows the details of a System.Runtime.Remoting.Proxies.__TransparentProxy object). And when I try to call a property inside of the remote object, I get a NullReferenceException. I know this might not be enough information to solve the NullReferenceException problem, but how can I make sure that I realy have a reference to my remote object, and how should one go about debugging remote objects? Thanks in advance, Shy.

        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        Hi! The proxy is created when you call Activator.GetObject() but until you actually call any method on the remote object, there's no need to establish a network connection to the server. From my understanding, the remoting infrastructure doesn't hold the network connection open all the time and chokes whenever the remoting server goes down, but is only interested in whether the server can be reached during method calls to the remote object. So the only way to find out whether the server is running is to actually call a method on the remote object. For one of my projects I added a simple Available property (always returning true) to the server object so that I have a method to call without any sideeffects.

        Regards, mav -- Black holes are the places where God divided by 0...

        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