Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

secure sub folder with forms authentication

Options
  • 08-03-2007 10:36pm
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    My website has a sub folder called cms. I need this to be secured with forms authentication. At the moment nothing is happening, can anyone tell me what im doing wrong ? Thanks

    My web.config at the moment has the following
    
    <location path="cms/">
        <system.web>
        <authentication mode="Forms">
    		<forms name="login" path="/cms" loginUrl="cms/login.aspx" protection="All" timeout="60" />
        </authentication>
       
        <machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
        
        <authorization>
              <deny users="?" />
        </authorization>  
        </system.web>
        </location>
    


Comments

  • Closed Accounts Posts: 5,284 ✭✭✭pwd


    You can't put the authentication section inside the location tag.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Put the forms auth in its own web.config in the cms folder to secure it. It will take the parent authentication otherwise..


  • Registered Users Posts: 872 ✭✭✭grahamor


    ok, i put a separate web.config in the cms folder.

    Now im getting a parser error for the login page - could not load type ?

    i've recompiled but no luck - any ideas ?


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    any chance you could give the full error


Advertisement