111
cjs
2025-06-06 03e67373c4c3bef21936ec1f9037f2ebcd434583
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="utf-8"?>
 
<!-- 有关使用 Web.config 转换的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=301874 -->
 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <!--
    在以下示例中, "SetAttributes" 转换将 "connectionString"
    的值更改为仅在 "Match" 定位器找到具有值 "MyDB" 的
    属性 "name" 时使用 "ReleaseSQLServer"。
 
    <connectionStrings>
      <add name="MyDB"
        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
  -->
  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
    <!--
      在以下示例中,"Replace" 转换将替换 Web.config 文件的
      整个 <customErrors> 节。
      请注意,由于在 <system.web> 节点下只有一个
       customErrors 节,因此无需使用 "xdt:Locator" 属性。
 
      <customErrors defaultRedirect="GenericError.htm"
        mode="RemoteOnly" xdt:Transform="Replace">
        <error statusCode="500" redirect="InternalError.htm"/>
      </customErrors>
    -->
  </system.web>
</configuration>