This topic is locked
[SOLVED]

 autologin not working version 6.2

2/6/2011 12:04:26
ASPRunnerPro General questions
H
heets author

Hi All,

I am trying to set up autologin as described in this tips and tricks article:

autologin tip
I modified the tablename and the location per the instructions but no joy.
It's not working for me. All I get is a session is expired message and I cannot even login manually.

I am using advanced security settings to allow users to only see and edit their own data. I read in another post that if you do that you need to set the Session("OwnerID") value so I tried that but I'm not sure if I did that correctly.
Any help or suggestions would be appreciated.
Thanks

Sergey Kornilov admin 2/8/2011

Link doesn't look correct.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

H
heets author 2/9/2011



Link doesn't look correct.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


Sorry, I corrected the link.

Sergey Kornilov admin 2/9/2011

I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

H
heets author 2/10/2011

Followup: The xlinesoft support team came through again. I am using ASPRunner Pro version 6.2 and they suggesting using this updated code in the "Login Page: Before Process" event. This code did the trick for me, hope it helps you too.
strUsername = Request("username")

strPassword = Request("password")
if strUsername<>"" and strPassword<>"" then

strSQL = "select * from INVOICE where " & CSmartStr(AddFieldWrappers(cUserNameField)) & "=" & CSmartStr(strUsername) _

& " and " & CSmartStr(AddFieldWrappers(cPasswordField)) & "=" & CSmartStr(strPassword)
logged = false

doAssignment rs,db_query(strSQL,conn)

doAssignment data,db_fetch_array(rs)

if bValue(data) then

if IsEqual(data(cUserNameField),sUsername) and IsEqual(data(cPasswordField),sPassword) then

logged = true

end if

end if
if bValue(logged) then

Session("UserID")=strUsername

Session("AccessLevel") = ACCESS_LEVEL_USER

Session("GroupID")=data("ID")

Session("OwnerID")=data("ID")

Session("_SUPPL_OwnerID")=data("ID")

end if
asp_header "Location: SUPPL_List.asp"
response.end

end if