Forum Discussion
IT_Support_5777
Nimbostratus
Sep 28, 2007Cookie Peristence ASP Session ID
I would like to get some help with the following iRule:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "ASP.NET_SessionId"] } {
persist add uie [HTTP::cookie "ASP.NET_SessionId"]
}
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "ASP.NET_SessionId"] } {
persist uie [HTTP::cookie "ASP.NET_SessionId"]
}
}
this looks at the ASP.NET session ID cookie and directs the LTM to send traffic back to the responding server, which is critical for our application. But we have a mixture of ASP and ASP.NET servers and I need the same thing done there. ASPSESSIONID is not so easy though...
We need to be able to do the same thing with the ASP sites as is done with the ASP.NET sites.
The problem is, the ASPSESSIONID cookie changes. It has what looks like a unique identifier on the end of the string. Two examples are given below from two different servers:
HTTP/1.1 200 OK
Date: Fri, 28 Sep 2007 14:44:30 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Length: 3080
Content-Type: text/html
Expires: Thu, 27 Sep 2007 22:04:30 GMT
Set-Cookie: ASPSESSIONIDSCSTRBCS=ADFSGDLOACOMNHJFKAHDEGEEFD; path=/
Cache-control: private
HTTP/1.1 200 OK
Date: Fri, 28 Sep 2007 14:54:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Length: 3080
Content-Type: text/html
Expires: Thu, 27 Sep 2007 22:14:05 GMT
Set-Cookie: ASPSESSIONIDQCDQSDAA=KAJBFABCDFDSFGDJKPEPPNFK; path=/
Cache-control: private
Is there any way to capture these? it looks as though I need to be able to parse the variable to do some logic.
7 Replies
Sort By
- Deb_Allen_18Historic F5 AccountThere's a codeshare example addressing this issue:
- Marcus_Slawik_8Historic F5 AccountHi,
- IT_Support_5777
Nimbostratus
thank you. I seem to be having issues implementing your solutions. the ASPID variable is empty most of the time. - Marcus_Slawik_8Historic F5 AccountDid you try to put a OneConnect profile on the VS using a /32 mask?
- IT_Support_5777
Nimbostratus
no. I have not learned how oneconnect works yet. - hoolio
Cirrostratus
Here is a pretty concise summary from Unruley: - IT_Support_5777
Nimbostratus
ok, thanks. I will check it out. the issue with our application is that once a session has started, it *cannot* be load-balanced. it must continue to send to the original server until the session ends.
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