J
Jenny
Hi all
I've problems with forms authentication. I'm using a simple
function on the login.aspx page:
Private Sub LoginButton_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
LoginButton.Click
If (FormsAuthentication.Authenticate(TextBox_Name.Text,
TextBox_Password.Text)) Then
FormsAuthentication.SetAuthCookie(TextBox_Name.Text, True)
Response.Redirect("Webform1.aspx", False)
Else
....
End If
End Sub
End Class
And my web.config:
<authentication mode="Forms" >
<forms
name="AuthCookie"
path="\"
loginUrl="Login.aspx"
protection="All"
timeout="300">
<credentials passwordFormat="Clear">
<user name="Test" password="Password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="Test"/>
<deny users="?" />
</authorization>
After starting and entering the correct information I'm
redirected from webform1.aspx to login.aspx with
http://localhost/Authentification/Login.aspx?ReturnUrl=/Authentification/Webform1.aspx
But I can find the AuthCookie in the Internet Explorer. Is
there something to change in IIS? I'm really at a loss!
Thanks for help
Jenny
I've problems with forms authentication. I'm using a simple
function on the login.aspx page:
Private Sub LoginButton_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
LoginButton.Click
If (FormsAuthentication.Authenticate(TextBox_Name.Text,
TextBox_Password.Text)) Then
FormsAuthentication.SetAuthCookie(TextBox_Name.Text, True)
Response.Redirect("Webform1.aspx", False)
Else
....
End If
End Sub
End Class
And my web.config:
<authentication mode="Forms" >
<forms
name="AuthCookie"
path="\"
loginUrl="Login.aspx"
protection="All"
timeout="300">
<credentials passwordFormat="Clear">
<user name="Test" password="Password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="Test"/>
<deny users="?" />
</authorization>
After starting and entering the correct information I'm
redirected from webform1.aspx to login.aspx with
http://localhost/Authentification/Login.aspx?ReturnUrl=/Authentification/Webform1.aspx
But I can find the AuthCookie in the Internet Explorer. Is
there something to change in IIS? I'm really at a loss!
Thanks for help
Jenny