wanlitao / HangfireExtension

Hangfire Extension plugins
Apache License 2.0
22 stars 32 forks source link

ConnectionString detection is not very robust #18

Closed umerfaruk closed 2 years ago

umerfaruk commented 6 years ago

I am trying to pass a connectionString as a parameter in the method GlobalConfiguration.Configuration.UseSQLiteStorage. But it tries to treat the connectionstring as connectionstring name and fails to find it in configuration.

Looking at the code https://github.com/wanlitao/HangfireExtension/blob/master/src/Hangfire.SQLite/SQLiteStorage.cs#L308 it seems like it is trying to find ";" in the string. I had to explicitly add it at the end.

wanlitao commented 6 years ago

the detection code is consistent with official Hangfire.SqlServerStorage https://github.com/HangfireIO/Hangfire/blob/master/src/Hangfire.SqlServer/SqlServerStorage.cs#L307

as the Sqlite connectionString generally contains multi keywords such as Data Source, Version, etc so ";" should be find in the connectionString