I have 4 docker container in a yml file.
- Db container
- Identity Server Container (asp.net core application with identity server)
- Api Server (asp.net core application)
- Client (Angular 9 app)
Everything works well on development windows machine and I deployed it on one of client on his windows server and I hosted all application on IIS with 3 different sites on IIS and a separate database.
Now, what I want is to deploy it on linux docker container, overall configuration works well, though need improvements(which I can do) but I am stuck at the following error, and with docker logs on Identity server container it show following error
fail: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7] An exception was thrown while deserializing the token. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {d7972341-6e64-467d-af09-124f5ba3e3a8} was not found in the key ring. at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
Remember I am using a pfx file for certificate on Identity Server container.
I just don't understand where this key issue is coming and where this key is not found in the key ring ?
Any help or discussion would be highly appreciated.
After success, I want to deploy it either on Digital Ocean