Why! Why! I keep getting returned back to my login page.
For some reason i keep getting kicked back to my login page and i can't for the life of me work out WHY! :confused:
VB Code:
<%@ trace="true" %>
<script runat="server">
Sub Page_Load
Dim checkstr as string
checkstr = Request.QueryString("action")
If User.Identity.ISAuthenticated = "false" then
If not Request.QueryString("action") = "login" then
Response.Redirect("default.aspx?action=login")
end if
end if
End Sub
Sub Button_click
Trace.Write( " txtUsername.text = " & txtUsername.text )
Trace.Write( " txtPassword.text = " & txtPassword.text )
If txtUsername.text = "So" and txtPassword.text = "So" then
FormsAuthentication.RedirectFromLoginPage( txtusername.text, chkRemember.Checked )
else
Response.Redirect("default.aspx?action=summ")
End If
End sub
</script>
<% Select Case Request.QueryString("action")
Case "login"%>
<html>
<head><title>default.aspx?action=login</title></head>
<body>
<form Runat="Server">
<h2> Please Login: </h2>
<asp:Label
ID="lblMessage"
ForeColor="Red"
Runat="Server" />
<p>
<b>Username:</b>
<br>
<asp:textbox
ID="txtUsername"
Runat="Server" />
<p>
<b>Password:</b>
<br>
<asp:textbox
ID="txtPassword"
Runat="Server" />
<p>
<asp:checkbox
ID="chkRemember"
Runat="Server" />
Remember me with a cookie?
<p>
<asp:button
Text="Login!"
Runat="Server" />
</form>
<% Case "filelist" %>
<% Case "fileupload" %>
<% Case Else
Response.Redirect("Action is Null") %>
<% End Select %>
DEFAULT.ASPX
VB Code:
<configuration>
<system.web>
<authentication mode="Forms">
<forms
name=".ASPXAUTH"
loginUrl="Default.aspx?action=login"
protection="All"
timeout="80"
path="/"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<compilation debug="true"/>
</system.web>
</configuration>
WEB.CONFIG
Also i want all log-in's to go to
efile.aspx?action=summ
can some help me on this to?