Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the `Arr-Disable-Session-Affinity` header coming through on my Azure Web App (WebSite)?

Following the procedure in this article I disabled the ARR Affinity cookie on my Azure Web App with this header in my responses:

Arr-Disable-Session-Affinity: True

It does remove the cookie, which is very much a good thing. But, the header itself is still coming through. This header doesn't really hurt anything, but according to that same doc it shouldn't be there:

If you add the Arr-Disable-Session-Affinity header to disable the affinity cookie, ARR will not set the cookie, but it will also remove the Arr-Disable-Session-Affinity header itself, so if your process is working correctly, you will see neither.

So...how do I get it to remove the header, too?

like image 345
Michael Haren Avatar asked May 22 '15 19:05

Michael Haren


People also ask

How do I turn off affinity arr?

How to check if my application has the ARR affinity enabled. Go to the Azure portal. Note: If you don't need it, you can disable it there. Just need to select off and click on the save button.

What is Arr affinity In Azure?

ARR Affinity assigns a cookie to the user which ensure the same instance will be used until the session has expired.

What is an Affinity cookie?

Affinity cookie is used to control the effective loading of the website and to ensure that all user requests are directed to the same server in any browsing session.


1 Answers

if you have added the Arr-Disable-Session-Affinity custom header as below in your Azure Web App web.config, then it is a correct behavior you still see the Arr-Disable-Session-Affinity header with value set to true and the ARR cookie removed in your HTTP response. I think it's an incorrect statement in the reference blog you provided which stated that the Arr-Disable-Session-Affinity header will be removed.

If you want to remove that header then the cookie will present, it's mutually exclusive.

<system.webServer>
<httpProtocol>
  <customHeaders>
    <add name="Arr-Disable-Session-Affinity" value="true" />
  </customHeaders>
</httpProtocol>

enter image description here

like image 82
juvchan Avatar answered Sep 18 '22 16:09

juvchan