Active4D 7.2r1, WS 2019, 4D v19.7.291.917, compiled, 4D Server

11 views
Skip to first unread message

David Ringsmuth

unread,
Aug 1, 2024, 3:30:48 PM8/1/24
to Active4D

Please help!,

 

I’ve got a script that is failing on Set Session(“UserID”;

//-------------------------------------------------------------------------------------------------------------------------

CM.Web_Log_A4D("Account found, Password match")

CM.Web_Log_A4D("After Account found.")

Set Session("UserLoggedIn";"True")

CM.Web_Log_A4D("After UserLoggedIn.")

$vsRecNo:=String([Account]AccountNo)

CM.Web_Log_A4D("After String([Account]AccountNo).")

Set Session Timeout(30)

CM.Web_Log_A4D("After Set Session TImeout.")

$RecNo_I:=Num($vsRecNo)

$UserID:=Get Session("UserID")

CM.Web_Log_A4D("After Num($vsRecNo). UserID: Type: "+type descriptor($UserID)) // <- shows longint here

Set Session("UserID";"") // <- this works OK

CM.Web_Log_A4D("After UserID Blank string.")

Set Session("UserID";0)  // <- this works OK

CM.Web_Log_A4D("After UserID 0.")

//----------------------------------------------------------------------------------------------------------------------------------------------

Set Session("UserID";[Account]AccountNo) // <- this fails, and the next line of code that executes is the CM.RDR at the bottom

CM.Web_Log_A4D("After UserID [Account]AccountNo")

//----------------------------------------------------------------------------------------------------------------------------------------------

Set Session("UserName";$vtUserName)

Set Session("Password";$vtPassword)

Set Session("SessionID";Web_GetSessionID)

Set Session("RecNo";$vsRecNo)

CM.Web_Log_A4D("After RecNo.")

If(Not(Defined($classid)))

                $classid:=Get Session("Register")

End if

CM.Web_Log_A4D("After ClassID.")

CM.Web_Log_A4D("Get Session(UserLoggedIn)="+Get Session("UserLoggedIn")+",AcctNo: "+string(Get Session("UserID")))

$vtUserID:=Get Session("UserID")

A4D_BB_SetSetting("web"+$vtUserID;"Response";"")

A4D_BB_SetSetting("web"+$vtUserID;"TransactionStatus";"")

Set Session("ShowAcct";"True")

CM.RDR("myschedule.a4d"+$vsLoc)

//

 

In the above code snippet if I replace the failing line of code with this Set Session("UserID";$RecNo_I) it also fails to assign, and the next line of code executed is the CM.RDR

 

Set Session("UserID";$RecNo_I) // <- this fails, and the next line of code that executes is the CM.RDR at the bottom

CM.Web_Log_A4D("After UserID $RecNo_I")

 

Thanks!

David Ringsmuth

 

Darin Schroeder

unread,
Aug 1, 2024, 5:09:09 PM8/1/24
to David Ringsmuth, Active4D
Hi David,

Are all the type changes just for testing? There would seem to be a more direct route to get that done.

Also, have you tried just using Session{"UserID"} and Session{"UserID"} := [Account]AccountNo  It's been a long time since I used Get/Set Session.

Darin


--
You received this message because you are subscribed to the Google Groups "Active4D" group.
To unsubscribe from this group and stop receiving emails from it, send an email to active4d+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/active4d/66abe265.050a0220.92c93.01b9%40mx.google.com.

David Ringsmuth

unread,
Aug 1, 2024, 5:27:57 PM8/1/24
to Darin Schroeder, Active4D

I did not try your suggested syntax, but I will.

 

Yes all of the type changes are for testing and they all work, until assigning the longint from an A4D local var, or from a table/field.

 

Thanks!

 

David Ringsmuth

612-840-1430

Aparajita

unread,
Aug 1, 2024, 9:44:21 PM8/1/24
to Active4D
Have you checked the Active4D log for an error message? And please don't just send it to me and ask me to look at it. I went to a lot of trouble to make the logs extremely readable and informative. If there was an error, the log message will be prefixed with "[error]".

David Ringsmuth

unread,
Aug 2, 2024, 1:41:24 PM8/2/24
to Aparajita, Active4D

I need to confess a relapse here.

 

Last November I had a similar problem that I thought was caused by a corrupted software item having to do with Active4D. I worked around that fiasco by using URL based sessions instead of cookies.

 

This time I have not yet tried replacing the Active4D components to see if that fixes the problem.

 

I am remembering from discussion with the tech people at this site that some anti-virus software injects itself into other software as part if its tactics. I’m wondering it that may be causing the session issues with this value not being able to be set.

 

https://medium.com/csg-govtech/process-injection-techniques-used-by-malware-1a34c078612c

 

Has anyone else here experience with anti-virus process injection?

 

David Ringsmuth

--

You received this message because you are subscribed to the Google Groups "Active4D" group.
To unsubscribe from this group and stop receiving emails from it, send an email to active4d+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages