Forum Discussion
jkrumb_106236
Nimbostratus
Dec 02, 2010iRule attached to SSL virtual server (get cookie contents fails)
Hello all,
I am new to the forum and a newbie regarding iRule programming. I have configured a virtual server listening on TCP port 443 and attached an HTTP profile as well as an iRule. Tryi...
hoolio
Cirrostratus
Dec 02, 2010Hi Joachim,
Is there a reason you don't/can't use cookie insert persistence? That would be simpler than keying off of the application's cookie.
Do you have a client SSL profile added to the virtual server? In order for LTM to be able to decrypt the SSL, there must be a client SSL profile enabled on the virtual server.
Also, if the cookie name is ASP.NET_SessionId, why are you looking for the cookie name in the list of response cookies? I think you've gotten this from the Codeshare example for ASP where the cookie name had a server token. This isn't necessary when the app's cookie name is static.
If you do want to use the app's cookie you could use the first example in this Codeshare entry:
http://devcentral.f5.com/wiki/default.aspx/iRules/ASP_SessionID_Persistence.html
when HTTP_REQUEST {
Log debug messages to /var/log/ltm? (0=no, 1=yes)
set debug 1
set SessionId [HTTP::cookie ASP.NET_SessionId]
if {$::debug}{log local0. "Client: [IP::client_addr]:[TCP::client_port] Request SessionId: >$SessionId<"}
if { $SessionId != "" } { persist uie $SessionId 1800 }
}
when LB_SELECTED {
if {$debug}{log local0. "Client: [IP::client_addr]:[TCP::client_port] LB to: [LB::server addr]"}
}
when HTTP_RESPONSE {
set SessionId [HTTP::cookie ASP.NET_SessionId]
if {$debug}{log local0. "Client: [IP::client_addr]:[TCP::client_port] Response SessionId: >$SessionId<"}
if { $SessionId != "" }{ persist add uie $SessionId 1800 }
}
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects