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 Events fail if network not connected until after app starts

Remoting Events fail if network not connected until after app starts

Scheduled Pinned Locked Moved C#
csharpdotnetsysadminquestion
1 Posts 1 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.
  • J Offline
    J Offline
    John Whitmire
    wrote on last edited by
    #1

    The scenario: Peer-to-peer network through a switch; no DNS, all fixed addresses. Main app establishes a remoting connection (Activator.GetObject) to a marshalled singleton object in a service on another machine. The app reads properties and invokes methods on the remote object. It also subscribes, through a wrapper, to events raised by the remote object. Remoting is configured in the config file on both ends. What works: All actions initiated by the app. Also, by monitoring the periodic events from the remote object, the app detects loss of connection (whether from physical disconnect or termination of the remote object) and will automatically recover when the object again becomes available. This has been extensively exercised. What fails: If the app's host machine is not physically connected to the switch until after the app starts, the event subscriptions fail to work. The app gets no notice of this. The remote object gets a "connection actively refused" exception when it invokes the event delegate. :wtf: Already tried: Delaying instantiation of the event wrapper until after the first time the remote host could be successfully pinged. No change. Please note: EVERYTHING works great as long as the network cable was connected at the time the app was started. All events are properly delivered and all subsequent disconnects are appropriately handled with successful recovery upon reconnect. The only known difference between the working and non-working scenarios is WHEN the network cable was connected to the switch: before or after the app starts. I'm at a loss for where to look next. :confused: What am I missing? (Also, should I cross-post this to the .NET Framework forum?)

    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