I came here today as I was working through the deployment challenges to move a poc effort from a personal sandbox into a representation of our actual target deployment model.
In this case I was working through the scenario where Hangfire is running as an ASP.NET application under a User-Assigned Managed Identity and then connecting to SqlServer which has the login/granted permissions given to that identity.
In my experimentation, I also bumped into some keywords in the connection string seemed to not be supported but worked fine in “my code”. This is how I first became aware of the recent v2 versus v3 SqlClient and the 2 different namespace/packages. I am using the newer one primarily so that I can leverage the native retry policy for both connections & commands.
Now with chasing the correct connection string to use I’ve became aware that the v2 versus v3 aspect has more bearing and with Hangfire being on a different version I am wondering if/when Hangfire will be updating to the latest SqlClient?
Also, it would be nice to have the documentation reflect the ‘correct’ connection string to use for this scenario for the Hangfire SqlClient version in use. Seems like this would be a fairly common deployment model for an Azure shop.