I have a parent application which has a config file that contains connection strings.
I would like all child applications I develop to be able to reference this config file so I only have to update connection strings in one place.
Parent Application web.config
<connectionStrings configSource="ConnectionStrings.config"/>
Parent Application ConnectionStrings.Config
<?xml version="1.0"?>
<connectionStrings>
<add name="MyConnectionString" connectionString="Data Source=***;Initial Catalog=***;Integrated Security=False; Password=***;User ID=***" providerName="System.Data.SqlClient" />
</connectionStrings>
This works fine for bringing in data in the parent application.
I've added the ConnectionStrings.config file to my child application as a linked file and then reference it in the web.config as follows:
Child Application web.config
<connectionStrings configSource="ConnectionStrings.config"/>
But when I run the child application I get the following error:
Unable to open configSource file 'ConnectionStrings.config'. (C:\Child Application\web.config line 8)
Any ideas?
Thanks