home / software / tips and tricks / How App.confg file can Reference an External config File for connecton string?

How App.confg file can Reference an External config File for connecton string?

Updated:  10/03/2012 09:10 AM
Author:  Shiju Mathews

Status:    Resolved.


In web sites App.confg' files can Reference and read an External config file for connectonstring. This is useful in many situations when one project is referencing another project. This is also help to manage the solution by avoiding the duplicate connectonstring values.

Connectionstring element is valid in .NET 3.5 and above

Add a App.config the the project. Open the App.config file and edit the 'connectionStrings' element under configuration.


Now add your External.config to D:\projects directory

External.config


Tags: How App.confg file can Reference an External config File for connecton string?
Updated on: April 2024