ArgumentException: Affinity key name set on the cluster 'allclusterprops' must not be null.


Question: Playing with #Yarp #Reverse #Proxy and copying the #configuration straight from the Yarp Documentation Site throws an error "ArgumentException: Affinity key name set on the cluster 'allclusterprops' must not be null."

Has anyone solved this issue yet?


Login to See the Rest of the Answer

Answer:
Yes, I got the same error as well, to work around this issue, I just added the "AffinitykeyName": "SomeValue".
See the code below:

 "SessionAffinity": {
          "Enabled": true, // Defaults to 'false'
          "AffinityKeyName": "Key1",
          "Policy": "Cookie", // Default, alternatively "CustomHeader"
          "FailurePolicy": "Redistribute", // default, Alternatively "Return503Error"
          "Settings": {
            "CustomHeaderName": "MySessionHeaderName" // Defaults to 'X-Yarp-Proxy-Affinity`
          }
        },





For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]