Hi, here's my code
If AuthorizeUser(txtUsername.Text, txtPassword.Text) Then
If Request.QueryString("ReturnURL") > "" Then
FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, False)
Else
FormsAuthentication.SetAuthCookie(txtUsername.Text, False)
Response.Redirect("Checkout.aspx")
End If
End If
I have an AuthorizeUser function that checks for a webpassword in my sql dat
abase. Return true or false if it exists. Well, my prolem is when I call t
he User.Identity.Name in another form after the SetAuthCookie line has fired
, the value is "". Why isn
't the User.Identity.Name have a value when SetAuthCookie is initiated?Hi Bryan,
You may need to look at this articles? [url]http://www.15seconds.com/issue/020220.htm.[
/url]
You may also need to do something with the SiteIdentity and SitePrincipal cl
asses?
Thanks,
Jon
Saturday, March 24, 2012
Login FormsAuthentication
Labels:
asp,
authorizeuser,
codeif,
formsauthentication,
login,
net,
querystring,
request,
returnurl,
text,
thenif,
txtpassword,
txtusername
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment