Hosting one .Net application in another RRS feed

  • Question

  • Hi,

    I'm trying to host one application, say A.exe, in another application, say B.exe. Now A.exe had its own A.exe.config and so does B. I made A.exe -> A.dll. A.exe was a simple winforms application that utilizes its App.config. Now when I am are loading the main dialog from A.dll in B.exe, I dont know how to go about the config file issue. I hope I made my question clear.

    Tuesday, June 2, 2009 12:43 PM

All replies

  • You can place the app.config entries of a.exe to the b.exe app.config file.

    .Net Goodies
    Remember to click "mark as answered" when you get a correct reply to your question
    Tuesday, June 2, 2009 6:57 PM
  • That was one option, but turns out I can't. A.exe was created as a simple utility, which is now required to work as a plugin within several other larger applications whose config files i cannot change.

    Now i have found a way to do this. I have renamed the app.config of A.exe to a.dll.config. And i can pick it up using:

    Configuration c = ConfigurationManager.OpenExeConfiguration("a.dll");

    But i dont know how to go about reading values this way. For instance I have an 'Section1' section and i need to read Section/Extensions collection from it.

    Wednesday, June 3, 2009 11:25 AM
  • Hi ZS

    What is your goal by hosting?

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Send us any feedback you have about the help from MSFT at
    Friday, June 5, 2009 9:07 AM