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

How web.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 'web.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 web.config the the web project. Open the web.config file and edit the 'connectionStrings' element under configuration.


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

External.config


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