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?


Please 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`
          }
        },

Write an Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy