Page view counter

Multiple Web.Config files to have login and different parts?

Last post 11-12-2007 1:08 AM by thukralz. 2 replies.

Sort Posts:

  • Multiple Web.Config files to have login and different parts?

    11-10-2007, 10:06 PM
    • Loading...
    • thukralz
    • Joined on 03-07-2006, 1:59 PM
    • Posts 164
    • Points 69

    Hello Everyone,

     I have one main web.config file and then I added another in a folder say secure. As anything within that folder I need it to be password protected.

    <?xml version="1.0"?>

    <configuration>

    <system.web><authentication mode="Forms">

    <forms name=".TEST" loginUrl="default.aspx"

    protection="All" path="/" timeout="30" />

    </authentication>

    <authorization>

    <deny users ="?" />

    <allow users = "*" />

    </authorization>

    </system.web>

     

    </configuration>

     This is the error I get :

    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.

    Can anyone please let me know how to fix this ?

  • Re: Multiple Web.Config files to have login and different parts?

    11-11-2007, 7:35 AM
    • Loading...
    • MaineOne
    • Joined on 01-20-2006, 1:00 AM
    • Maine
    • Posts 273
    • Points 1,141

     You need to set up the new folder as an application folder. If local I believe you do this in ControlPanel_AdministrativeTools_Microsoft.NET Framework 2.0.

    If on a hosted site there should be a way to set it in the Account management site.

    Support@aspsksolutions.com

  • Re: Multiple Web.Config files to have login and different parts?

    11-12-2007, 1:08 AM
    Answer
    • Loading...
    • thukralz
    • Joined on 03-07-2006, 1:59 PM
    • Posts 164
    • Points 69

    What I was doing wrong was everything I was putting in the secondary web.config file.

    The authentication part should be in main web.config and authorization part in secondary.

Page 1 of 1 (3 items)