![]() |
Sergey Kornilov admin 11/8/2007 |
The code itself looks good. |
N
|
NigelEtienne author 11/9/2007 |
The code itself looks good. I'd suggest to print Request.ServerVariables("LOGON_USER") variable on the web page to make sure it's populated. Response.Write Request.ServerVariables("LOGON_USER")
|
![]() |
Sergey Kornilov admin 11/9/2007 |
I guess it's safe to use BeforeProcessLogin event for this purpose. |
N
|
NigelEtienne author 11/12/2007 |
Sergy |
N
|
NigelEtienne author 2/22/2008 |
Sergy Many thanks for the help, auto login now working. Here is the code sub BeforeProcessLogin(dbConnection) [color=#008000]'Our system always puts the domain at the start of the UserID so I used the code right(Request.ServerVariables("LOGON_USER"),8)" to restrict the text string to the last 8 characters i.e just the UserID. SESSION("UserID") = right(Request.ServerVariables("LOGON_USER"),8) SESSION("AccessLevel") = ACCESS_LEVEL_USER 'Replace X or Y with Valid User Id's If session("UserID")="" then [color=#008000]'Replace MyMenu and MyTask_List with page you want to display Response.Redirect ".asp" else Response.Redirect "[color=#0000ff]MyTask_List.asp" end if End Sub [/color]
|