一个网站中包含两个Web配置文件. [英] two web config files in one web site.
问题描述
你好朋友,
在我的网站中,我创建了一个CMS文件夹,在其中保存了我网站的所有CMS页面.
我现在将我的web.config文件放在父文件夹中,我希望为CMS页设置一些不同的设置,这些设置应仅适用于CMS页而不适用于其他页面,因此,我在CMS文件夹中创建了一个新的web.config文件但是当我编译项目时,它给了我以下错误:在应用程序级别之外使用注册为allowDefinition ="MachineToApplication''的节是错误的."
我的问题是
1)我的网站上可以有两个web.config文件吗?
2)还有其他方法可以实现上述功能吗?
hello friends,
In my web site i have created a CMS folder in which i have saved all CMS pages for my web site.
I have my web.config in my parent folder now i want some different settings for my CMS pages and these settings should be applicable for only CMS pages and not to other pages so, i have created one new web.config file in my CMS folder but when i compile the project it gives me the following error: "It is an error to use a section registered as allowDefinition=''MachineToApplication'' beyond application level. "
My question is
1) Can i have two web.config files in my web site??
2) Is there any other way to implement above functionality??
推荐答案
请参考此链接
http://www.beansoftware.com/ASP.NET-Tutorials/Multiple-Config.aspx [^ ]
Please refer this link
http://www.beansoftware.com/ASP.NET-Tutorials/Multiple-Config.aspx[^]
对于您的错误,请参考 http://forums.iis.net/p /1148147/1864289.aspx [ ^ ]
可以使用多个web.config,一个以上的Web.config文件 [
For your error, refer http://forums.iis.net/p/1148147/1864289.aspx[^]
It''s fine to use multiple web.config, Working with more than one Web.config file[^]
这篇关于一个网站中包含两个Web配置文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!