none
Hooking into load of App.config/Web.config ?? RRS feed

  • Question

  • I have some issues where same configuration information is scattered into many different configuration files.

    I sort of now how to solve it at deploy time but I would like if Operations only had one place to change vital information.

    One way to do this, would be some sort of runtime macrosubstituions. For instance

    $(ENV_VARIABLE) For substituting a value with the value from the environment variables

    $(INCLUDE_FILE) For including another file

    $(PROPERTY_FILE_KEY) Like (N)ANT: Refer to a value in a property file

    I order to do this I need to be able to hook into the configuration XML nodes when they are loaded. I could probably do this in configuration section handlers, but I would like something generic.

    And of course: If anyone has created already, that would just be swell :)

    Best regards

    Soeren D. 

    Wednesday, August 13, 2014 6:56 PM

Answers

  • Hi Soeren,

    >I sort of now how to solve it at deploy time but I would like if Operations only had one place to change vital information.

    Per my understanding, I have no idea about hooking the process of loading system and user configuration file. I haven’t seen some APIs can do this. But if you want to save vital information away from normal information, I think you can use the following method. See more information from http://stackoverflow.com/questions/3366199/system-configuration-with-separate-config-file.

    If I misunderstand you, please feel free to let me know.

    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.

    Thursday, August 14, 2014 2:17 AM
    Moderator