how to activate the configure file change watcher RRS feed

  • Question

  • Hi all,

    I need to swtich back and forth between the DEV and QA database for debugging by changing the connection string in a application configuration file and compiling code. I know the change in the configure file can be discerned by a file change event and  the cache content can be modified accordingly. Please tell how. Now we are using the Enterprise Cache Block.




    Wednesday, October 9, 2013 4:03 PM


  • Hi Clara,

    What kind of application are you working on? Please tell us WinForm or ASP. NET or other applications?

    The application configuration file is a special file, its contents will be loaded before the program starts running complete. If you are using WinForm, you should restart the application to re-load the content of the configuration file. If you are using ASP. NET, IIS will automatically reboot to reload the content of the configuration file when system detects a change of the configuration file. So I think if you want to meet your requirement, you should use other custom file. Like txt, xml, ini and so on. The change of contents of these files does not affect the application at runtime.

    By the way, the content of Enterprise Cache Block is outdated and is no longer being maintained. You could find more information on this reference. http://msdn.microsoft.com/en-us/library/ff649918.aspx. Please describe the problem in detail and provide more information, so we could give you advice.

    Best 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.

    Friday, October 11, 2013 2:22 AM