Web.Debug.config is an XML transform file that specifies how the Web.config file should be changed when it is deployed in Debug mode.
Web.Debug.config is an XML transform file that specifies how the Web.config file should be changed when it is deployed in Debug mode.
EXAMPLE 1
In the example below, the SetAttributes
transform will change the value of the connectionString
attribute to use ReleaseSQLServer
only when the Match
locator finds an attribute name
that has a value of MyDB
.
<connectionStrings>
<add connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
name="MyDB"
xdt:Locator="Match(name)"
xdt:Transform="SetAttributes" />
</connectionStrings>
EXAMPLE 2
In the example below, the Replace
transform will replace the entire <customErrors>
node of your Web.config file with what's below.
Note that because there is only one <customErrors>
node under the <system.web>
node, there is no need to use the xdt:Locator
attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly"
xdt:Transform="Replace">
<error redirect="InternalError.htm"
statusCode="500" />
</customErrors>