'Duende Identity Server- Why I get an error ArgumentNullException after accepting consents (only on deployed .Net 6)?

I have a project that uses Identityserver 4 with Blazor server. With .Net 5, it worked like a charm, both on development and when deployed. I updated to .Net 6 and Duende Identity server. After updating the project, it works on development, but I get this error after I accept the consents the and Idp server redirects to my application. "ArgumentNullException: IDX10000: The parameter 'json' cannot be a 'null' or an empty object. (Parameter 'json') Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectMessage..ctor(string json)" System.ArgumentNullException: IDX10000: The parameter 'json' cannot be a 'null' or an empty object. (Parameter 'json') at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectMessage..ctor(String json) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)

I have spent days on this issue, but could not end with a solution. I appreciate a lot if anybody can help me on this issue.



Solution 1:[1]

I found a solution. In ISS, I set the Application pool identity to "localSystem" for the site running IDP, and it is running now.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 saifi