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. .NET (Core and Framework)
  4. How publsiher-subscriber configurations can be included in a single app.config?

How publsiher-subscriber configurations can be included in a single app.config?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpsysadminhelpquestionworkspace
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.
  • G Offline
    G Offline
    glitteringsound
    wrote on last edited by
    #1

    Hello, I am writing simple server(publisher) and client(subscriber) application to imagine interprocess communication between two managed C# processes. I need to write server(that's working as a publisher), it is publishing the contents to the subscriber on the basis of its subscriptions and client(subscriber). For this I have to write 2 seperate configuration files (app.config) on both publisher and subscriber's end. It's creating a problem. Publisher when want's to publish the data, it starts the process(client which's working as subscriber) with Process.Start statement. On start client process unable to initialize remoting, because it loads config.app which 's being used on server side. Where it did'nt find its own configurations(subscriber's configuration's). I need to write both subscriber and publisher configuration on a single app.config file.How? Regards, Usman

    realJSOPR 1 Reply Last reply
    0
    • G glitteringsound

      Hello, I am writing simple server(publisher) and client(subscriber) application to imagine interprocess communication between two managed C# processes. I need to write server(that's working as a publisher), it is publishing the contents to the subscriber on the basis of its subscriptions and client(subscriber). For this I have to write 2 seperate configuration files (app.config) on both publisher and subscriber's end. It's creating a problem. Publisher when want's to publish the data, it starts the process(client which's working as subscriber) with Process.Start statement. On start client process unable to initialize remoting, because it loads config.app which 's being used on server side. Where it did'nt find its own configurations(subscriber's configuration's). I need to write both subscriber and publisher configuration on a single app.config file.How? Regards, Usman

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      The way I approached this was to create an assembly that managed access to a specific settings file, and referenced that assembly in all of the necessary applications. I posted an article that uses this technique here: Synchronicity - A Folder Synchronizing Application[^] The files you want to look at are: AppSettingsBase.cs in the AppSettingsLib project and SyncSettings.cs in the SynchroLib project

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

      G 1 Reply Last reply
      0
      • realJSOPR realJSOP

        The way I approached this was to create an assembly that managed access to a specific settings file, and referenced that assembly in all of the necessary applications. I posted an article that uses this technique here: Synchronicity - A Folder Synchronizing Application[^] The files you want to look at are: AppSettingsBase.cs in the AppSettingsLib project and SyncSettings.cs in the SynchroLib project

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

        G Offline
        G Offline
        glitteringsound
        wrote on last edited by
        #3

        I digged out further and imagined that the problem i described, it will no longer be the issue at all. Can you please answer or help out the problem that I described. Because the problem now directed as this. "How can Remoting Obj Uri be gernated at runtime at subscriber's end?"

        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