Clean Web.Config file in Asp.NET 4.0?

痴心易碎 提交于 2019-12-24 15:26:28

问题


Okay,

I am wondering having clear web.config file could be good but you know some shared web hosting companies don't allow us to touch things like machine.config and etc.

So If a lot of things have been moved onto machine.config, then will we be allowed to change things like we used to through web.config file.


回答1:


Nothing is changing in this regard with ASP.NET 4.0: the way the ASP.NET configuration model has always worked is that you can override settings in machine.config with a web.config in your site root and further in sub-directories.

Here is a summary of what's actually changing for ASP.NET 4.0 config files and the reasoning behind the decision, it's basically to reduce the file size, make things less complicated and easier to read: http://weblogs.asp.net/scottgu/archive/2009/08/25/clean-web-config-files-vs-2010-and-net-4-0-series.aspx



来源:https://stackoverflow.com/questions/2799213/clean-web-config-file-in-asp-net-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!