Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# VisualStudioWeb.Config转换_C#_Visual Studio_Web Config_Web.config Transform - Fatal编程技术网

C# VisualStudioWeb.Config转换

C# VisualStudioWeb.Config转换,c#,visual-studio,web-config,web.config-transform,C#,Visual Studio,Web Config,Web.config Transform,我们已经很好地改造了web.configs 但是,对于其中一个,我们只需要将所有这些添加到web.config 不确定如何添加整个XML节点 system.webServer <rewrite> <rules> <rule name="Redirect To HTTPS" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditio

我们已经很好地改造了web.configs

但是,对于其中一个,我们只需要将所有这些添加到web.config

不确定如何添加整个XML节点

system.webServer
<rewrite>
  <rules>
    <rule name="Redirect To HTTPS" enabled="true" stopProcessing="true">
      <match url="(.*)" />
      <conditions logicalGrouping="MatchAll">
        <add input="{HTTPS}" pattern="^OFF$" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
    </rule>
  </rules>
</rewrite>
system.webServer

在目标转换配置文件内的
节点上使用
xdt:Transform=“Insert”
,不建议将XML添加到XML文件中。您应该编写自己的配置部分。这是一篇关于msdn的直截了当的文章