0

When I publish the same app to multiple nodes in Azure and use traffic manager to route the requests evenly, I get the following error in ApplicationInsights and I'm unable to determine the cause:

Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)","outerId":"11388138","message":"The key {XXXXXXXXXXXXXX} was not found in the key ring.","type":"System.Security.Cryptography.CryptographicException","id":"9351281"}]

We have never seen this error before adding the new node.

Your assistance is appreciated.

Update: I have disabled traffic manager and linked dns to 2 different webapps, the error is still there, perhaps deploying the same solution to two different webapps causes the issue?

Techy
  • 2,026
  • 4
  • 20
  • 41
  • You're using anti forgery tokens, they're encrypted or have a signature and the required key isn't available on the new box. [This](https://stackoverflow.com/questions/34319802/mvc-6-webfarm-the-antiforgery-token-could-not-be-decrypted) might help or point you in the right direction. – Matt Jul 20 '17 at 18:40
  • @Matt Thank you so much, can you kindly help us on how to achieve a solution in Azure for the problem? I think that the other answer is a non-azure case. – Techy Jul 20 '17 at 18:44
  • @Matt would enabling ARR Affinity in both solve the problem? – Techy Jul 20 '17 at 18:45
  • The first part of the linked answer talks about Azure keys, but sorry I haven't had to deal with this on Azure. Some more info [here](https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers) that might help, good luck! – Matt Jul 20 '17 at 21:08
  • @Matt thanks a lot, please see edit above – Techy Jul 20 '17 at 23:53

0 Answers0