This topic is locked

Windows authentication

2/22/2008 8:42:36 AM
ASPRunnerPro General questions
N
NigelEtienne author

QUOTE (NigelE @ Nov 12 2007, 07:43 AM)

Sergy

Many thanks for the help, auto login now working. Here is the code
sub BeforeProcessLogin(dbConnection)

'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")="X" or session("UserID")="Y" then

'Replace MyMenu and MyTask_List with page you want to display

Response.Redirect "MyMenu.asp"

else

Response.Redirect "MyTask_List.asp"

end if

End Sub
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7647&image=2&table=forumtopics' class='bbc_emoticon' alt=':blink:' />

I have just loaded the latest version of ASPRunnerPro build 391 and now the autologin seems to be ignoring the ASP user security settings i.e. autologin runs and redirects to appropriate page but then users cannot see data specifically assigned to them - they get the "no records" message displayed.

I have set the security setting for the MyDetails page as "Users can see and edit their own data only" with Users TableID: OwnerID Field = Login and Main Table: OwnerID Field = Login (where login = their network login ID).

I have changed the event from BeforeProcessLogin(dbConnection)

to LoginOnLoad - same result.

If I remove the LoginOnLoad event all security settings work correctly.

Any ideas on what is causing this conflict?

Regards

Nigel

Sergey Kornilov admin 2/22/2008

If you use Advanced Security settings make sure you also populate Session("OwnerID") variable.

N
NigelEtienne author 2/25/2008

If you use Advanced Security settings make sure you also populate Session("OwnerID") variable.


Can you explain to me what screen this would be on?

Sergey Kornilov admin 2/25/2008

This needs to be added to the BeforeProcessLogin event code you posted above.

N
NigelEtienne author 2/26/2008

This needs to be added to the BeforeProcessLogin event code you posted above.


<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=26327&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' /> Do you have an example, I have searched the forum and cannot find an example - only SESSION("OwnerID") in the online help but that has obsolete written after it.

N
NigelEtienne author 3/6/2008

Do you have an example, I have searched the forum and cannot find an example - only SESSION("OwnerID") in the online help but that has obsolete written after it.