locked
Can I save app config file changes for an installed Windows Service App? RRS feed

  • Question

  • Hello all,

    From my testing yesterday on a Windows 7 desktop, it doesn't seem feasible but I wanted to ask in case there is a process I missed.

    The issue occurs when trying to use the ConfigurationManager.OpenExeConfiguration() which doesn't return the Configuration Object. I am getting the path back (using reflection and some of the other methods back to my install folder) and that is passed as the parameter to the above method.

    Any thoughts or insights would be greatly appreciated.

    Thanks,

    Bob


    BobH

    Tuesday, December 22, 2015 11:58 AM

Answers

  • Hello all,

    From my testing yesterday on a Windows 7 desktop, it doesn't seem feasible but I wanted to ask in case there is a process I missed.

    The issue occurs when trying to use the ConfigurationManager.OpenExeConfiguration() which doesn't return the Configuration Object. I am getting the path back (using reflection and some of the other methods back to my install folder) and that is passed as the parameter to the above method.

    Any thoughts or insights would be greatly appreciated.

    Thanks,

    Bob


    BobH

    I guess you are passing incorrect folder path to OpenExeConfiguration method, the following page discuss more about this path, please refer to see https://social.msdn.microsoft.com/Forums/vstudio/en-US/e59800bc-614c-4b5c-9266-2df58f898198/windows-service-and-configuration-file?forum=wcf

    Please try the solution on the above link and let me know if it works for you.

    I hope it helps.

    Regards,

     

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by BobH Wednesday, December 23, 2015 1:12 PM
    Wednesday, December 23, 2015 6:09 AM