Forum Discussion

vaibhav_MD_2489's avatar
vaibhav_MD_2489
Icon for Nimbostratus rankNimbostratus
Sep 29, 2016

Problem with iRule after 11.2 upgrade

Hi Getting a error message frequently after updating OS to 11.6, Please help me to fix this issue.

Thanks a lot in advance.

Error Message:-

TCL error: /Common/exchange_irule_new - attempt to use empty persistence key (line 2) invoked from within "persist uie [HTTP::header "Authorization"] 1800"

iRule :

when HTTP_REQUEST {

if { [HTTP::header "User-Agent"] contains "MSRPC" } {

persist uie [HTTP::header "Authorization"] 1800
pool exchange_oa_pool

} else {

persist cookie
pool exchange_owa_pool

} }

1 Reply

  • It seems, that there is not persistence record, which can be used for this reference. The reference for the persistence is then Authorization Header. If the record does not exist, it cannot be used. Maybe you have to modify the iRule, so that the record is created, if it does not exist. Therefore it may make sense to not check on the User-Agent and check for the existence of the Authorization Header instead.

    Please refer to https://support.f5.com/kb/en-us/solutions/public/7000/300/sol7392.html

    Maybe you should give it a try with:

    when HTTP_REQUEST {
    
        if { [HTTP::header exists "Authorization"] && [string tolower [HTTP::header "Authorization"]] starts_with "basic" } {
            set as_key [sha256 [HTTP::header "Authorization"]]
            persist uie $as_key 1800
            pool exchange_oa_pool
    
    }
    

    But you will need an action, that sets the persistence record within the HTTP_RESPONSE event. Unfortunately I don't know how the response from the Exchange is looking like, when the Authentication was successful. I think the exchange_oa_pool is Outlook Anywhere. In this the Authentication is typically done via NTLM. Then there should a response header of "WWW-Authenticate", containing something like "negotiate".

    If would suggest to use the iApp for publishing Exchange Applications. It creates all the iRules you need. Please download the latest iApp Templates instead of using the builtin iApp Templates, before deploying it.

    Greets, svs