Forum Discussion
Please HELP! Session variable problems!
I have a custom iRule and have found I am unable to access session variables - I have found tons of examples on DevCentral that appears to let you set/get them so what in the world is the deal? This syntax is literally cut and pasted from other iRules.
when HTTP_RESPONSE {
ACCESS::session data set "session.secureauthCert" "exists"
set certChecked [ACCESS::session data get "session.secureauthCert"]
log local0. "CERTCHECKED: $certChecked"
}
- Kevin_StewartEmployeeSilly question, but do you have APM licensed and an access policy applied to the virtual server?
- fouken_30253Nimbostratus
Yes, APM is licensed and an access policy is applied to the server. I have found examples of using these commands from the HTTP_RESPONSE event - but can you really?
- Kevin_StewartEmployeeI just tested it with an 11.2 box, and yes it does work there. Can you say what the specific error is?
- fouken_30253Nimbostratus
That's what is odd - I don't seem to get an error, but when I read it back and log it - I get no value. I am at a loss.
- Kevin_StewartEmployeeWhat BIG-IP version?
- fouken_30253Nimbostratus
BIG-IP 11.1.0 Build 2185.0 Hotfix HF4
- Eric_Kolb_27656Nimbostratus
FYI, I'm having the same problem. I'm trying to pass variables between event blocks in an iRule, but ACCESS::session is not working in HTTP_REQUEST. When I do ACCESS::session data set followed immediately by ACCESS::session data get on the same key, I get an empty string as a result.
I did find that the docs for HTTP_REQUEST event (https://devcentral.f5.com/wiki/iRules.HTTP_REQUEST.ashx) does not list ACCESS::session as an available command. However, I still have not found a good way to pass a user-specific variable between event blocks.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com