HTTP Error 500.30 - ASP.NET Core app failed to start

I was doing a restore to another environment today. The destination db server was using Always on Availability groups.

We use single sign on for our app server configurations.

After preforming the restore and reconfiguring the availability group, regenerating the database and recycling the application pool I was getting the following
“HTTP Error 500.30 - ASP.NET Core app failed to start”, when trying to connect from the application pool, even of more concern I was getting an error when I was testing the connection to the database in the application configuration of:
“The Database xxxxx is not an ice database”

I have never struck this sort of problem before.
Checking the event logs I noticed that the there was an entry in there that mentioned:
“The SELECT permission was denied on the object ‘GlobalSettingAttribute’, database ‘XXXXXXXX’, schema ‘Ice’.”

A comparison between the service account configuration in each sql server showed no difference, setting it as dbo of the application database Resolved the problem. Now I could test the database in the configuration and connect to the database through the test in the application configuration.

Digging deeper turns out there service account on the source server is set to sysadmin role… :thinking:

Anyway I hope someone finds this useful… There was nothing in the Epicare database relating to this error.