Using connectionStringName quartz property with configsource attribute

90 views
Skip to first unread message

Lewis K.

unread,
Nov 13, 2019, 10:40:46 PM11/13/19
to Quartz.NET
We're using Quartz.net 2.2.4 on a project that I help maintain.  In order to minimize exposure of sensitive data, we've been removing connection strings from configuration files where possible.  Our Quartz configuration was using the quartz.dataSource.myDS.connectionString property - I changed it to use quartz.dataSource.myDS.connectionStringName with the value referencing an item in the connectionStrings section of the app.config file.  So far, so good.  Then I modified the app.config file to use the configSource property on the connectionStrings section, so that the connection string itself would be present in a separate file.  Having deployed this change, the quartz service will no longer start - it gives the following error message in the event log:

Service cannot be started. Quartz.SchedulerConfigException: Failure occurred during job recovery. ---> Quartz.JobPersistenceException: Failed to obtain DB connection from data source 'myDS': System.InvalidOperationException: The ConnectionString property has not been initialized.

I conclude that quartz is reading the configuration file itself, rather than using operating system utilities to get the configuration data; and that it's not smart enough to know how to interpret the configSource property.  Does anyone know if this issue is rectified in a more recent version than we're using (2.2.4)?  Or have any suggestions how to work around this?

Thank you.
Reply all
Reply to author
Forward
0 new messages