Login Control Security HELP

Discussion in 'ASP .Net Security' started by KT, Dec 6, 2006.

  1. KT

    KT Guest

    I am using the login control and need to know how to setup the pages within
    the site to only be accessible after logging in.

    I'm have the settings below in my web.config and it works and only allows
    users in Admin roles. The problem is if I type in the address
    http:/localhost/test/main.aspx it still allows me to view the page without
    logging in. How do I force users to login and if they navigate to a page
    without logging in it sends them to the login page?

    <authorization>
    <allow roles="Admin" />
    <!--<allow users="?" />-->
    </authorization>

    <roleManager enabled="true" />

    <authentication mode="Forms">
    <forms loginUrl="/login.aspx" />
    </authentication>

    <location path="login.aspx">
    <system.web>
    <authorization>
    <allow users="?" />
    </authorization>
    </system.web>
    </location>

    <location path="main.aspx">
    <system.web>
    <authorization>
    <allow users="Admin" />
    <deny users="?" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    Thanks in advance.

    KT
     
    KT, Dec 6, 2006
    #1
    1. Advertising

  2. KT

    Brock Allen Guest

    Brock Allen, Dec 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ike2010
    Replies:
    0
    Views:
    680
    ike2010
    Nov 15, 2005
  2. Zdzislaw
    Replies:
    0
    Views:
    396
    Zdzislaw
    Apr 25, 2004
  3. ad

    Can login with Login Control

    ad, Aug 28, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    958
    Tim_Mac
    Aug 31, 2006
  4. Sasquatch
    Replies:
    2
    Views:
    1,325
    Sasquatch
    Oct 3, 2006
  5. Jack
    Replies:
    1
    Views:
    731
Loading...

Share This Page