How to read sub configuration settings from Web.config in WCF Service Application RRS feed

  • Question

  • I have a WCF Service Application with a Web.config file. I have another folder called ConfigFiles which contains some configuration files have some settings. I need to read those settings and get those values.

    For that, I provided the config section in  root  Web.Config file, also I specified the path to sub config files as follows:

          <add name="Local File Configuration Source"  filePath="ConfigFiles\LocalConfiguration.config"
               type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0,Culture=neutral, PublicKeyToken=null"/>

    Now, while running the service, I am getting the error that "ConfigFiles\LocalConfiguration.config cannot found".

    I know that the behavior in web.config for reading the sub config files is different.  But I am not sure how to resolve the same. Could anybody please provide any help?



    Monday, February 25, 2013 7:05 AM


All replies