How can I merge these two web.config files?

♀尐吖头ヾ 提交于 2019-12-25 08:34:33

问题


I have 2 web.config files -- one in my root and one in my /knowledgebase/ directory -- which I have converted to an application in IIS7.

Nevertheless, I still get the: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Users\Owner\Documents\Visual Studio 2010\WebSites\USS\knowledgebase\web.config 35

My /knowledgebase/ web.config line 35-38 is:

    <authentication mode="Forms">
    <forms name=".YAFNET_Authentication" protection="All" timeout="43200"   
     cookieless="UseCookies"/>
     </authentication>

Which I'm sure conflicts with my root web.config, which is:

    <authentication mode="Windows">
        <forms loginUrl="~/knowledgebase/" timeout="2880" />
    </authentication>

I'm having the same issues with authentication as I am with roleManager. Since converting the directory to an application in IIS7 didn't work is it possible to merge these web.configs? If so how would I go about doing so? Thanks!

Addendum: Here's a snapshot of my IIS7, which (to me) clearly shows it's an application:

来源:https://stackoverflow.com/questions/10414751/how-can-i-merge-these-two-web-config-files

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