In DF 20, I get some extra characters in the end.
"S-VASI" in the cookie returns "S-VASI" + 2 x 0 characters + another "I"
Printable View
In DF 20, I get some extra characters in the end.
"S-VASI" in the cookie returns "S-VASI" + 2 x 0 characters + another "I"
Made a small fix in case anybody has same issue..
[CODE]
Get GetCookie "BrugerKode" to sBruger
If (Pos(Character(0),sBruger)>0) Move (Left(sBruger,Pos(Character(0),sBruger)-1)) to sBruger
[/CODE]
How is this cookie written? Can you post an example?
Hi Harm
Its set from an asp file like this
[CODE]
response.cookies("BrugerKode")=oLoginUsers.call("Get_Login_Name", IC2SessionKey)
[/CODE]
Function in backend to get the logged in username:
[CODE]
Function Login_Name String sSessionKey Returns String
String sSupportBruger sText
Clear WebAppSession
Move sSessionKey to WebAppSession.SessionKey
Find eq WebAppSession by Index.1
If (Found and WebAppSession.SessionKey = sSessionKey and sSupportBruger <> "") Begin
Function_Return (Trim(sSupportBruger))
End
Else If (Found and WebAppSession.SessionKey = sSessionKey) Begin
Function_Return (Trim(WebAppSession.LoginName))
End
Function_Return ""
End_Function
[/CODE]