Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.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# 我可以为system.web配置使用类似于appSettings的file属性的外部文件吗_C#_Web Config - Fatal编程技术网

C# 我可以为system.web配置使用类似于appSettings的file属性的外部文件吗

C# 我可以为system.web配置使用类似于appSettings的file属性的外部文件吗,c#,web-config,C#,Web Config,我希望在我的web.config的system.web部分中分离身份配置,并将其放在一个单独的文件中,这样我就不必签入正在使用的用户名/密码的源代码管理 这可能吗?看起来file属性对system.web部分不起作用,即使configSource属性起作用,我也不希望所有的system.web config部分都在一个不同的文件中 有人能帮忙吗 谢谢 更多的研究表明,虽然我们不能在部分使用configSource或file属性,但您可以在其中的标记上使用它 例如,我想将我们的globalizat

我希望在我的web.config的system.web部分中分离身份配置,并将其放在一个单独的文件中,这样我就不必签入正在使用的用户名/密码的源代码管理

这可能吗?看起来file属性对system.web部分不起作用,即使configSource属性起作用,我也不希望所有的system.web config部分都在一个不同的文件中

有人能帮忙吗


谢谢

更多的研究表明,虽然我们不能在
部分使用
configSource
file
属性,但您可以在其中的标记上使用它

例如,我想将我们的
globalization
设置从
web.config
移到
globalization.config
,因此我们更改了我们的web配置:

<system.web>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" />
    <!-- Other settings removed -->
</system.web>

对此

<system.web>
    <globalization configSource="globalization.config" />
    <!-- Other settings removed -->
</system.web>

更多的研究表明,虽然我们不能在
部分使用
configSource
file
属性,但您可以在其中的标记上使用它

例如,我想将我们的
globalization
设置从
web.config
移到
globalization.config
,因此我们更改了我们的web配置:

<system.web>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" />
    <!-- Other settings removed -->
</system.web>

对此

<system.web>
    <globalization configSource="globalization.config" />
    <!-- Other settings removed -->
</system.web>


system.webJacques上是否有使用文件属性的方法?我们正在尝试将我们的
globalization
配置放在一个单独的文件中。您是否找到了在
system.web
Jacques上使用file属性的方法?我们试图将我们的
globalization
config放在一个单独的文件中。