Note that there are some explanatory texts on larger screens.

plurals
  1. POweb.config issue in ASP.Net
    text
    copied!<p>I am using VSTS 2010 + ASP.Net + C# 4.0 to learn someone else's code for a WCF application. I find besides Web.Config, there are also Web.Debug.config and Web.Release.config. I searched the content of Web.Config, but cannot find any reference to Web.Debug.config and Web.Release.config. However in VSTS 2010 IDE solution explorer, I find there is an arrow pointed from Web.Config to Web.Debug.config and Web.Release.config -- so seems there is reference relationship. It makes me confused.</p> <p>In all 3 config files, there are identical items with different values, for example, in web.config, there is connection string DBConnectinString defined in this way,</p> <pre><code> &lt;connectionStrings&gt; &lt;add name="DBConnectinString" connectionString="data Source=10.10.10.123;uid=foo;pwd=foo;database=FOO" providerName="System.Data.SqlClient"/&gt; &lt;/connectionStrings&gt; </code></pre> <p>And in Web.Debug.config, there is connection string DBConnectinString defined in almost the same way with different values,</p> <pre><code> &lt;connectionStrings&gt; &lt;add name="DBConnectinString" connectionString="data Source=10.10.10.124;uid=foo;pwd=foo;database=FOO" providerName="System.Data.SqlClient"/&gt; &lt;/connectionStrings&gt; </code></pre> <p>My quesiton is,</p> <ol> <li>what is the relationship between Web.Config and Web.Debug.config/Web.Release.config?</li> <li>Why define the same item with different values in Web.Config and Web.Debug.config/Web.Release.config?</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload