B
Ben
Hi
I have the below code and am having problems with it, i get transferred to
the logindenied.aspx whether the credentials are correct or not.
Also once authenticated I want to forward the user to auth.aspx. How would
I do this?
Any help would be much appreciated.
Thanks B
Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LoginButton.Click
If FormsAuthentication.Authenticate(UsernameTextBox.Text,
PasswordTextBox.Text) Then
FormsAuthentication.RedirectFromLoginPage(UsernameTextBox.Text, True)
Else
Server.Transfer("logindenied.aspx")
End If
End Sub
web.config........................
<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="adminlogin.aspx"
protection="All" timeout="15">
<credentials passwordFormat="SHA1" >
<user name="myusername" password="myPassword"/>
< /credentials>
</forms>
</authentication>
I have the below code and am having problems with it, i get transferred to
the logindenied.aspx whether the credentials are correct or not.
Also once authenticated I want to forward the user to auth.aspx. How would
I do this?
Any help would be much appreciated.
Thanks B
Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LoginButton.Click
If FormsAuthentication.Authenticate(UsernameTextBox.Text,
PasswordTextBox.Text) Then
FormsAuthentication.RedirectFromLoginPage(UsernameTextBox.Text, True)
Else
Server.Transfer("logindenied.aspx")
End If
End Sub
web.config........................
<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="adminlogin.aspx"
protection="All" timeout="15">
<credentials passwordFormat="SHA1" >
<user name="myusername" password="myPassword"/>
< /credentials>
</forms>
</authentication>