G
Guest
We just switched our web application from .NET 1.1 to 2. Once client can't
login out of several that have been successful. They enter a correct user
name and password, click the login button and they are redirected back to
login with no errors or login failure. The same login account works fine from
other machines at different locations.
This client had no problem logging in before we switched. The login
procedures are essentially the same except for the .NET version. They are
using an updated IE6 browser.
Here is what I'm doing:
Build ticket:
Dim ticket As New FormsAuthenticationTicket(1, ".TICKETNAME",
System.DateTime.Now, System.DateTime.Now.AddMinutes(30), False,
Session.SessionID)
Dim authCookie As New HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(ticket)) Response.Cookies.Add(authCookie)
Make session variables:
Session("LoginName") = prmLoginName.Value
Session("DocGUID") = prmDoc.Value
Session("EmpID") = prmEmployeeID.Value
If prmEmployeeID.Value > 0 Then
Session("UserClass") = "Staff"
Else
Session("UserClass") = "Client"
End If
Session("GetsCEM") = prmGetsCEMRpt.Value
Session("GetsPAC") = prmGetsPACRpt.Value
Session("GetsHOL") = prmGetsHOLRpt.Value
Check for authentication and session value from the loading page:
If Request.IsAuthenticated Then
If Session("LoginName") <> "" Then
[Proceed with page setup routines if successful....]
Else
'Go back and login again
FormsAuthentication.SignOut()
Session.Abandon()
Session.RemoveAll()
Response.Redirect(Server_Protocol(Request.ServerVariables("SERVER_NAME")) &
"webaccess/login.aspx")
End If
Else
Response.Redirect(Server_Protocol(Request.ServerVariables("SERVER_NAME")) &
"webaccess/login.aspx")
End If
login out of several that have been successful. They enter a correct user
name and password, click the login button and they are redirected back to
login with no errors or login failure. The same login account works fine from
other machines at different locations.
This client had no problem logging in before we switched. The login
procedures are essentially the same except for the .NET version. They are
using an updated IE6 browser.
Here is what I'm doing:
Build ticket:
Dim ticket As New FormsAuthenticationTicket(1, ".TICKETNAME",
System.DateTime.Now, System.DateTime.Now.AddMinutes(30), False,
Session.SessionID)
Dim authCookie As New HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(ticket)) Response.Cookies.Add(authCookie)
Make session variables:
Session("LoginName") = prmLoginName.Value
Session("DocGUID") = prmDoc.Value
Session("EmpID") = prmEmployeeID.Value
If prmEmployeeID.Value > 0 Then
Session("UserClass") = "Staff"
Else
Session("UserClass") = "Client"
End If
Session("GetsCEM") = prmGetsCEMRpt.Value
Session("GetsPAC") = prmGetsPACRpt.Value
Session("GetsHOL") = prmGetsHOLRpt.Value
Check for authentication and session value from the loading page:
If Request.IsAuthenticated Then
If Session("LoginName") <> "" Then
[Proceed with page setup routines if successful....]
Else
'Go back and login again
FormsAuthentication.SignOut()
Session.Abandon()
Session.RemoveAll()
Response.Redirect(Server_Protocol(Request.ServerVariables("SERVER_NAME")) &
"webaccess/login.aspx")
End If
Else
Response.Redirect(Server_Protocol(Request.ServerVariables("SERVER_NAME")) &
"webaccess/login.aspx")
End If