关于Web.config [英] about Web.config

查看:77
本文介绍了关于Web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以有一个没有web.config文件的Web应用程序吗?还是我们的Web应用程序可以包含多个web.config文件,如果是,那么单个Web应用程序中有多个web.config文件有什么用?

can we have a web application without web.config file ? or can we have a  web application with more than one web.config file , if yes then what is the use of more than one web.config file in a single web application?

推荐答案

1.我们可以在不使用web.config的情况下运行网络应用(请在 此处阅读更多表格).
2.我们还可以在一个Web应用程序中包含多个web.config.
3. .NET应用程序配置层次结构至少有两个级别,即 文章 显示它们如何协同工作.
Level1:machine.config
您可以在.net文件夹(例如"C:\ WINDOWS \ Microsoft.NET \ Framework \ v1.1.4322 \ CONFIG")下找到它. ,它是目标计算机上所有.net应用程序的默认配置.
Level2:web.config或app.config(用于窗口应用程序)
是应用程序级别的配置,配置文件应位于应用程序的根文件夹中,它可以覆盖machine.config的配置.
Level3:其他web.config
它们应该位于应用程序根文件夹的子文件夹中.

1. We can have a web app running without web.config (read more form here).
2. We can also have more than one web.config in one web app.
3. The .NET app configuration hierarchy, there are at least two levels, the article shows how they works together.
    Level1: machine.config
               You can found it under .net folder (e.g. "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG"), it is the default fonfiguration for all .net application on the target machine.
    Level2: web.config or app.config (for window app)
               It is the configuration of application level, the config file should locate in your application's root folder, it can override the configuration of machine.config.
    Level3: other web.config
               They should locate in the sub-folders in the application root folder.

谢谢,
埃里克

Thanks,
Eric


这篇关于关于Web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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