Russell_McGinni
Jan 21, 2009Nimbostratus
Implement sticky sessions for a specific uri in VIP
I have a VIP that handles all traffic to a certain domain, however within that domain i have a specific ASP.Net application that uses Session Management and therefore I need to specifically provide a sticky session solution for just that uri
What i have is... but obviously not working... any help would be appreciated.
Thanks
when RULE_INIT {
set ::debug 1
set ::myval 0
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "TIMECLOCKF5"] } {
set cli [IP::remote_addr]:[TCP::remote_port]
set SessionId [HTTP::cookie ASP.NET_SessionId]
if { $SessionId != "" } {
persist uie $SessionId 1800
}
} elseif { [string tolower [HTTP::uri]] starts_with "/timeclock/" } {
set $::myval 1
}
}
when HTTP_RESPONSE {
if {$::myval} {
HTTP::cookie insert name "TIMECLOCKF5" value "testing"
set SessionId [HTTP::cookie ASP.NET_SessionId]
if { $SessionId != "" } {
persist add uie $SessionId 1800
}
}
}