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\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<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.
-->
<authentication mode="Forms">
<forms loginUrl="Home.aspx">
<credentials>
<user name="mathew" password="mathew"/>
</credentials>
</forms>
</authentication>
<authorization>
<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.