为什么要使用多个webconfig文件 [英] Why to use multiple webconfig files

查看:71
本文介绍了为什么要使用多个webconfig文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



昨天我只是尝试使用多个webconfig文件.
而且我成功地完成了如何编程多个webconfig文件的操作.

现在我的困惑是为什么要使用多个webconfig文件?

有效的答案表示赞赏.

预先感谢.

Hi,

Yesterday i was just trying to use multiple webconfig files.
And i succeeded on how multiple webconfig files can be programed.

Now my confusion is why to use multiple webconfig files?

Valid answers are appreciated.

Thanx in advance.

推荐答案

您可以在asp.net中使用一个以上的web.config文件.但是您不能在每个文件夹中放置多个web.config.首先,让我们了解一下web.config和其他配置文件设置的层次结构.在每个配置文件的顶部,您将拥有machine.config文件,该文件将具有所有系统范围的配置设置.您可以在OS驱动器中找到此文件,例如C:/windows/Microsoft.NET/vFrameworkNumber/Config文件夹.这里的框架号以及您正在使用的1.1/2.0/3.5或4.0的框架.您可以在应用程序根文件夹的web.config文件中覆盖这些设置.同样,您可以在子文件夹中添加更多web.config文件,并且可以覆盖父文件夹web.config文件的设置.
You can work with more then one web.config file in asp.net. But you can not put more then one web.config in each folder. Let’s first understand the hierarchy of web.config and other configuration file settings. On the top of the every configuration files you will have machine.config file which will have all system wide configuration settings.You can find this file in your OS drive like C:/windows/Microsoft.NET/vFrameworkNumber/Config folder. Here framework number with what ever framework you are using 1.1/2.0/3.5 or 4.0. You can override those settings in web.config file at the your application root folder. Same way you can add more web.config file in subfolder and can override the setting of parent folder web.config file.


这篇关于为什么要使用多个webconfig文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆