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… …
Anyway I hope someone finds this useful… There was nothing in the Epicare database relating to this error.
Running into a similar issue with 2023.1. Getting the same ASP.NET Core app failed to start error. But in our case in the log is showing a SQL timeout issue. The connection test in the app config is fine and the EAC can access the dB, run the upgrade process, and run a data model regen. But the client won’t connect.
System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.
I have it too on my test environment. 2022.2.19
Recycle app pool helps I believe.
I typically see it when the server is restarted, and my test server is very slow.
I’ve restarted the app pool several times. 2022.2 works fine with the same app pools. But 2023.1 won’t start. I hadn’t tried changing the startup limit as we’ve not needed to do that before. I tried 180 and 300 and same result.
We really didnt do anything fancy. We installed 2022 and 2023 on the same Machine. Just made sure that any Windows Features that 2023 requires are installed and that .NET Core Framework 6 and other packages it requires are installed.
I’ve seen your issue when a Box was slow starting up, but not beyond that. Look into Windows Event Viewer see if there is more info.
Check the Bindings make sure its not trying to use port 443 thats in use on the same IP.
I can make an ODBC connection from the app server to the SQL Server. Works fine. And 2022.2 on the same app server connects. But 2023.1 won’t connect. I uninstalled 2022.2 and only had 2023.1 installed. Same result. Reinstalled 2022.2 and it still connects.
When watching the SQL Server logs I can see the app server and service account connect to SQL right away. But then get the app failed to start message on the app server. I enabled some more logging and can see an error in the event log about the SQL connection timeout. But, ODBC and the EAC connect to the dB. Not sure how the client is connecting differently.
Application: w3wp.exe
CoreCLR Version: 6.0.1923.31806
.NET Version: 6.0.19
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'Ice.Hosting.AspNetCore.StartupHelper' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Ice.Configuration.AppSettings' threw an exception.
---> System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21055; handshake=29;
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
Have you double checked that your connection string is correct? Are you using Windows Auth or SQL auth? If you go into admin console server config can you test the db cnnection there successfully?
Look in your host.config file what do these connectionStrings look like?
Another thought… Check your application pool settings… I recall someone having an issue with the application pool with Enable 32 Bit applications was set to true causing a similar issue.