0

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: My IIS7

Jason Weber
  • 5,653
  • 6
  • 40
  • 73
  • I think there was a way to explicitly no-inherit the authentication block in the child web.config, or maybe no-inherit the whole file. But it's been ages since I did that, sorry. I think you'll have to register the knowledgebase directory as a separate IIS application though. – Rup May 02 '12 at 13:30
  • Have you seen this **http://stackoverflow.com/questions/521637/msbuild-error-while-compiling-asp-net-website** and **http://msdn.microsoft.com/en-us/library/bb629394.aspx** – huMpty duMpty May 02 '12 at 13:31
  • Hi Rup. I did right-click /knowledgebase/ and converted it to an application. Humpty, thank you for the links. I found one rogue web.config is an unused directory, and deleted it, but it didn't make a difference. I'm going to paste a picture of my IIS7. Thank you both for taking the time to read my question and offer your help! – Jason Weber May 02 '12 at 14:11

0 Answers0