Saturday, March 24, 2012

Login FormsAuthentication

Hi, here's my cod
If AuthorizeUser(txtUsername.Text, txtPassword.Text) The
If Request.QueryString("ReturnURL") > "" The
FormsAuthentication.RedirectFromLoginPage(txtUsern ame.Text, False
Els
FormsAuthentication.SetAuthCookie(txtUsername.Text , False
Response.Redirect("Checkout.aspx"
End I
End I

I have an AuthorizeUser function that checks for a webpassword in my sql database. Return true or false if it exists. Well, my prolem is when I call the 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? http://www.15seconds.com/issue/020220.htm

You may also need to do something with the SiteIdentity and SitePrincipal classes

Thanks

Jon

0 comments:

Post a Comment