Hi all
I am not that proficient in ASP.NET. Here I have a problem. I am doing authentication of the login form. Look at my code below.
IN the web.config file
<authentication mode="Forms">
<forms name="login.aspx" loginUrl=".ASPXAUTH">
<credentials passwordFormat="Clear">
<user name="devhood" password="password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="devhood"/>
<deny users="?"/>
</authorization>
Now I want to dispaly another form webform1.aspx when submit button in the login form is clicked. My code is as below
private sub button1_click(
ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
if formsauthentication.authenticate(txtusername.text,txtpassword.text) then
formsauthentication.redirectfromloginpage(txtusername,false)
else
'error message'
end if
end sub
But when I click the submit button it throws the error
"Error\n application
HTTP error 404
check the following url
\default.aspx"
Just let me know where I am making mistake . Is there any mistake in my authentication setting procedure. I feel I am making some mistake in the authentication procedure.
Thaks for help in advance.
I am not that proficient in ASP.NET. Here I have a problem. I am doing authentication of the login form. Look at my code below.
IN the web.config file
<authentication mode="Forms">
<forms name="login.aspx" loginUrl=".ASPXAUTH">
<credentials passwordFormat="Clear">
<user name="devhood" password="password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="devhood"/>
<deny users="?"/>
</authorization>
Now I want to dispaly another form webform1.aspx when submit button in the login form is clicked. My code is as below
private sub button1_click(
ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
if formsauthentication.authenticate(txtusername.text,txtpassword.text) then
formsauthentication.redirectfromloginpage(txtusername,false)
else
'error message'
end if
end sub
But when I click the submit button it throws the error
"Error\n application
HTTP error 404
check the following url
\default.aspx"
Just let me know where I am making mistake . Is there any mistake in my authentication setting procedure. I feel I am making some mistake in the authentication procedure.
Thaks for help in advance.