Thursday, July 31, 2014

Is there any possibility to keep configuration related information somewhere else other than the “AppName.exe.config”?

Hi Michael, I am sorry if it created confusion but actually the application I am working on is not developed by me, under maintenance I am just trying to achieve the requirement specified by stakeholder.


I will try to explain a bit more, hope that would help -


I have main exe application is based on MFC and the another one is based on C# WPF hosted by the main exe application. Now what I see is that the configuration needed by main exe app and hosted app is written in App.exe.config. I was looking for if there is any possibility to keep the configuration related to that hosted application out of the App.exe.config file. I was looking if there is a possibility to achieve this via configuration and I tried "lincedConfiguration", "ConfigSource" etc. but no success. During further investigation I saw that to bridge managed and unmanaged app there is a mixed mode code, where I found the "Bootstrapper.Run()" which I further understood is responsible to load the modules specified in the "App.exe.config". And then based on the suggestion of Linq-2-XML thought I would read the xml but not sure how to create the instance of the module specified in xml (as I have no experience in all this).


It's complex and I know that the problem exists is because of the way they have defined to configure the system. I have other alternatives to solve it but those are just tricks. I had no much idea about the app.config and all so wanted to dig out the information and possibilities about what things can we do with it, to learn it, and thanks to you all for your valuable time, suggestions, information and explanations.


Thank you very much !


- Prasad.






No comments:

Post a Comment