Forum Discussion

OTS02's avatar
OTS02
Icon for Cirrus rankCirrus
Sep 30, 2015

cookie persistence with ASP.NET_SessionId

I have a new Virtual Server that I want to use persistence. Its fairly normal https traffic. One of the cookies that the servers send to the clients is ASP.NET_SessionId, which seems to be unique for each client logging in. I have tried creating a built-in cookie persistence profile - nothing seems to work. Intuitively, it seems as though HTTP-Cookie-Passive, & Cookie Name = ASP.NET_SessionId, should work.

I have success with UIE, using the following iRule, but can it be done with a built-in cookie profile?

when HTTP_REQUEST {

set hsl [HSL::open -proto UDP -pool HIGH_SPEED_LOGGING]

set egains_token_value [HTTP::cookie value "ASP.NET_SessionId"]

if { [HTTP::cookie exists "ASP.NET_SessionId"] } {

  if { $egains_token_value != "" } {
      persist uie [HTTP::cookie "ASP.NET_SessionId"]
      HSL::send $hsl "hsl_S3_vimportal_UIE [IP::client_addr] , persisting on ASP.NET_SessionId value = $egains_token_value pool_info: [LB::server]"
     }
} else {
persist source_addr 1800
HSL::send $hsl "hsl_S3_vimportal_UIE [IP::client_addr] , source address persistence set for 1800 seconds"

}

}

when HTTP_REQUEST_RELEASE {

HSL::send $hsl "hsl_S3_vimportal_UIE server IP = [LB::server addr] , client IP = [IP::client_addr] ."

}

when HTTP_RESPONSE {

HSL::send $hsl "hsl_S3_vimportal_UIE [IP::client_addr] , TOP OF RESPONSE - ASP.NET_SessionId value = $egains_token_value, pool_info: [LB::server]"

}

3 Replies