본문 바로가기

Windows/.NET Framework

include web.config or app.config

이렇게 config파일을 하나 만들고 (root element 주의!)

<?xml version="1.0" ?>
<connectionStrings>
 <add name="MyDB" connectionString="Data Source=myServerAddress;Initial Catalog=MyDataBase; Integrated S... />
</connectionStrings>

 

 

아래와 같이 사용하면 된다.

<connectionStrings configSource="ConnectionStrings.config" />

 

http://blog.andreloker.de/post/2008/06/Keep-your-config-clean-with-external-config-files.aspx