- Fixed an issue where non-terminating errors could cause exceptions to be shown in dashboards.
- Fixed an issue where SQL persistence was using an outdated version of the MS SQL client.
Were you able to test this, Adam? My first test just threw the same connection string error (didn’t know what “Authentication” meant as a key) as 3.1.4 was throwing.
I compared your Microsoft.Data.SqlClient.dll to the one I’m using in my own project, and the timestamps are the same but they’re radically different sizes. Mine is only 272 KB, whereas yours is 1568 KB. Is it possible that somehow the latest version of the DLL didn’t get bundled into the zip?
Edit: Here’s the stack trace in case it helps. Maybe Hangfire is trying to use an outdated SQL client to get to the database?
[09:56:39 INF] Start installing Hangfire SQL objects... Unhandled exception. System.ArgumentException: Keyword not supported: 'authentication'. at System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary`2 parsetable, String connectionString, Boolean buildChain, Dictionary`2 synonyms, Boolean firstKey) at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary`2 synonyms) at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key) at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) at System.Data.SqlClient.SqlConnection..ctor(String connectionString) at Hangfire.SqlServer.SqlServerStorage.<.ctor>b__6_0() at Hangfire.SqlServer.SqlServerStorage.CreateAndOpenConnection() at Hangfire.SqlServer.SqlServerStorage.UseConnection[T](DbConnection dedicatedConnection, Func`2 func) at Hangfire.SqlServer.SqlServerStorage.Initialize() at Hangfire.SqlServer.SqlServerStorage..ctor(String nameOrConnectionString, SqlServerStorageOptions options) at Hangfire.SqlServer.SqlServerStorage..ctor(String nameOrConnectionString) at Hangfire.SqlServerStorageExtensions.UseSqlServerStorage(IGlobalConfiguration configuration, String nameOrConnectionString) at PowerShellUniversal.SQL.SqlFeature.ConfigureHangfire(IServiceCollection serviceProvider, IConfiguration configuration) in C:\actions-runner\_work\universal\universal\src\PowerShellUniversal.SQL\Plugin.cs:line 35
Not sure if it’s the latest, but behavior definitely changed, couldn’t upgrade our instance because the service wouldn’t start, when I tried to run it in console, the error it spat out was a SSL verfication error, which is a breaking change listed in 4.0.0:
(A temporary workaround would be to set “TrustServerCertificate=True” in the connection string, you can apparently also set Encrypt=False, but I did not test that), for reference here’s how that looks like in the connection string:
Of course the real permanent solution is to install a trusted certificate on your SQL server
I’ve updated the release notes about this and will consider rolling this back as I’ve had a couple people bring this up. Thank you for providing the link.
As for the Authentication keyword, this was tested with a local build but not the official production so I’m not exactly sure why it’s not working (and maybe another reason to roll this back). We’ll be revisiting this again this week for the 3.2 build to see what went wrong here.