Forum Discussion
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
- Kevin_Stewart
Employee
That's a common misconception. The following is an old document, but it details the cookie persistence options nicely.
Ultimately, for passive to work, the server has to be sending a cookie that has all of the persistence information already encoded in it.
- OTS02
Cirrus
Nice to know I'm not alone in my misconceptions :) Thanks Kevin
- Saif_Khan_26546
Nimbostratus
I have similar requirement for Cookie persistance for ASP.NET_SesssionID.
I am using a BUILT-IN persistance profile, and insert the "ASP.NET_SessionID" in the Cookie Name field.
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