Database Regen Error "Cryptographic failure while signing assembly"

Just wanted to post this here because I hadn’t seen it before and couldn’t find it when searching through here. Ended up finding the same issue in an old EpicCare ticket in the same company from back in 2021.

I was trying to add a requested UD field, but when I went to regen the data model in the Admin Console, I kept getting an error along the lines of “Ice.Data.Model Could not be regenerated, see log at C:\Users\Kevin.Veldman\AppData\Local\Temp\Epicor\DataModelGenerator\DataModelGenerator.log”

After opening DataModelGenerator.log, I found the following Error info at the end of the file (file was about 580 lines):

Turns out it was a permissions issue. For some reason server admins were not granted access to the directory C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

I was able to grant my own username access to that directory, and then I was able to regenerate the data model with no issues.

Note: The Epicor support on the EpicCare case suggested I would need to reboot the application server after changing the permissions. I did not, and it was successful anyway. YMMV.