asp.net security

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mathewgk80
    New Member
    • Sep 2007
    • 103

    #1

    asp.net security

    Hi all,
    I have two aspx pages. 1.Home.aspx and LoginPage.aspx.

    In the LoginPage.aspx, the user has to enter the username and password. and click on the submit button. If both username and password is correct, the control is redirected to Home.aspx.

    I used asp.net security feature in this application to set username and password.

    My web.config file is given below.

    <?xml version="1.0"?>
    <!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config. comments usually located in
    \Windows\Micros oft.Net\Framewo rk\v2.x\Config
    -->
    <configuratio n>

    <appSettings/>
    <system.web>
    <!--
    Set compilation debug="true" to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.
    -->
    <compilation debug="true"/>
    <!--
    The <authentication > section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authenticati on mode="Forms">
    <forms loginUrl="Home. aspx">

    <credentials>
    <user name="mathew" password="mathe w"/>
    </credentials>
    </forms>
    </authentication>
    <authorizatio n>
    <allow users="mathew"/>
    <deny users="*"/>
    </authorization>

    </system.web>

    </configuration>


    My problem is that when i run the LoginPage.aspx page, the control is directly transfered to Home.aspx.ie, when i run LoginPage.aspx, Home.aspx page is displayed and Login.aspx page not displayed so that i cant enter the username and password.

    What i need is i have to enter the username and password and if they are correct, the control should go to Home.aspx page .otherwise the control should be redirected to LoginPage.aspx.

    Please help me...

    Thanks and regards,
    Mathew.
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by mathewgk80
    Hi all,
    I have two aspx pages. 1.Home.aspx and LoginPage.aspx.

    In the LoginPage.aspx, the user has to enter the username and password. and click on the submit button. If both username and password is correct, the control is redirected to Home.aspx.

    I used asp.net security feature in this application to set username and password.

    My web.config file is given below.

    <?xml version="1.0"?>
    <!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config. comments usually located in
    \Windows\Micros oft.Net\Framewo rk\v2.x\Config
    -->
    <configuratio n>

    <appSettings/>
    <system.web>
    <!--
    Set compilation debug="true" to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.
    -->
    <compilation debug="true"/>
    <!--
    The <authentication > section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authenticati on mode="Forms">
    <forms loginUrl="Home. aspx">

    <credentials>
    <user name="mathew" password="mathe w"/>
    </credentials>
    </forms>
    </authentication>
    <authorizatio n>
    <allow users="mathew"/>
    <deny users="*"/>
    </authorization>

    </system.web>

    </configuration>


    My problem is that when i run the LoginPage.aspx page, the control is directly transfered to Home.aspx.ie, when i run LoginPage.aspx, Home.aspx page is displayed and Login.aspx page not displayed so that i cant enter the username and password.

    What i need is i have to enter the username and password and if they are correct, the control should go to Home.aspx page .otherwise the control should be redirected to LoginPage.aspx.

    Please help me...

    Thanks and regards,
    Mathew.
    right click on LogIn.aspx and click on "Set As Start Page" in the solution explorer....... ..

    Comment

    Working...