I am facing this issue from couple of days.
I develop a new VM and mount my old VHD on that VM and it was working fine but suddenly it stopped working and started giving me this error.
The solution I have tried so far are as fellow:
- Restart IIS , Clear cache of the browser, restart the services , build my custom models , Synchronized database but no error is found in the error list of VS.
- Extended the certificates using Power shell (MS Dynamics 365 Business Central : How to resolve error 500 while accessing Dynamics 365 Finance and Operations URL (anandnavconsultant.blogspot.com)
- set maintenance mode to SQLSYSTEMVARIABLES.VALUE = 0 and all other things mention here (https://community.dynamics.com/forums/thread/details/?threadid=ecc5440c-d5fc-48b9-9813-2f43274b24dd)