Within an web.config
-file in an ASP.NET-application some sections of config, like appSettings
and connectionStrings
, supports the attributes file
and configSource
.
What is the difference between using the file
-attribute and the configSource
-attribute? When should you use which attribute and can you use both?
<?xml version="1.0"?>
<configuration>
<appSettings file="AppSettings.config">
</appSettings>
<connectionStrings configSource="ConnectionStrings.config">
</connectionStrings>
<!-- ... -->
</configuration>
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…