This issue happens when your IIS specific machine keys are corrupt or missing. if the machine keys are corrupted the configuration in IIS and the keys go out of sync and any encryption or decryption task will start failing. That is the reason you might see the above error while changing the application pool identity to a domain or custom account. If you change the application pool identity to an account like local system or network service or service accounts which doesn’t need password and hence no encryption the task won’t fail.
How to fix the issue?
Most of the times we suggest to rebuild or reinstall IIS.
Besides, you can also regenerate machine keys without reinstalling IIS completely.
More information you can refer to this link: Keyset does not exist.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.