This issue is only present on the server I've published to. Locally I'm having zero issues.
After publishing from VS2017, the web page is displaying an Internal Server error with no further description on that page. This is not the first time I've published, so this issue is very random.
I'm at my wits end and am totally stumped as to what's causing this. Especially since before I hit publish, it was working fine. Although, it has been quite awhile since I've published from VS.
Things I've tried:
- Restarting Server
- Repairing IIS and ensuring correct .net core versions are installed.
- More server restarting
- Ensuring correct DLL's are present(even though this isn't first time publishing)
- Check connection strings in appsettings
- View stdoutLog output
- View event log - this didn't display anything helpful
The stdoutLog stacktrace is as follows:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile not available. Using 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\AutoGenKeys\S-1-5-82-1102471511-930544150-2645822985-2987586966-3557056008\DataProtection' as key repository and Windows DPAPI to encrypt keys at rest.
Application startup exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: providerInvariantName
at Serenity.Data.DbProviderFactories.GetFactory(String providerInvariantName)
at Serenity.Data.SqlConnections.GetFactory(String providerName)
at Serenity.Data.ConnectionStringInfo.get_ProviderFactory()
at ApexCore.DataMigrations.EnsureDatabase(String databaseKey) in DataMigrations.cs:line 40
at ApexCore.DataMigrations.Initialize() in DataMigrations.cs:line 27
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.AspNetCore.Server.IISIntegration.IISSetupFilter.<>c__DisplayClass4_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
As you can see, it's saying errors are being thrown in DataMigrations.cs
. Which doesn't entirely make sense, since there has been zero changes in there for a significant amount of time. The area where the errors are being thrown is past the point where the database tables are created. So this would make sense that migrations are failing since the Tables don't exist.
So, to sum it up... Website won't load after newest publish. Tables aren't being created in Database as they should be. Connection strings are correct and no errors are appearing saying it's unable to connect.
One thing I do want to mention is that when looking in IIS Manager under Connection Strings, I noticed that there's nothing there anymore. Isn't this suppose to get auto-populated with whats in my AppSettings
?