How publsiher-subscriber configurations can be included in a single app.config?
-
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
-
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
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 andSyncSettings.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 -
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 andSyncSettings.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, 1997I 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?"