asp.net webconfig,如何从默认文件的配置源文件中读取 [英] asp.net webconfig, how to read from a config source file for default documents
本文介绍了asp.net webconfig,如何从默认文件的配置源文件中读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Web.config文件,并使用asp.net 3.5在iis 7上运行.
我想知道是否有一种方法可以将默认文档列表保存在单独的文件中.
例如代替这个:
I''m working with a Web.config file and running on iis 7 using asp.net 3.5.
I was wondering if there is a way to keep a list of default documents in a separate file.
for instance instead of this:
<defaultDocument>
<files>
<remove value="Default.htm" />
<add value="portalmain.aspx" />
</files>
</defaultDocument>
我们从另一个配置文件中读取值:
We read the values from another config file:
<defaultDocument>
<files configSource="WebDefaultDocuments.config"/>
</defaultDocument>
谢谢
Thanks
推荐答案
AFAIK,无法完成.
文件只是一个元素,没有根据文档定义的任何属性.
请在此处参考详细信息: MSDN:defaultDocument元素[IIS设置架构] [ ^ ]
AFAIK, it cannot be done.
File is just an element without any attributes defined as per documentation.
Refer details here: MSDN: defaultDocument Element [IIS Settings Schema][^]
这篇关于asp.net webconfig,如何从默认文件的配置源文件中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文