-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Elsa.UseMongoDb() options.DatabaseName does not set Database #5391
Comments
Based on the information provided, it seems that there is an issue with the way Elsa is handling MongoDB database names. The expected behavior is that Elsa should use the database name specified in the service registration options, but instead, it is using the database name specified in the connection string's To resolve this issue, you can try the following steps:
Remember to provide all relevant information, including the version of Elsa you are using, the environment details, and the exact steps to reproduce the issue, to help the developers understand and address the problem effectively. This comment was generated by Glime. |
Description
When registering MongoDB for ELSA, setting the options.DatabaseName does nothing.
Instead, ELSA relies on the "defaultauthdb", the database defined in the connection string after the /.
https://www.mongodb.com/docs/drivers/csharp/current/fundamentals/connection/connect/
Steps to Reproduce
Expected Behavior
The Database set in the service registration gets used by ELSA
Actual Behavior
The Database set in the connection string as default auth DB gets used by ELSA.
If none is set (piece is optional), Elsa fails on startup.
Environment
Log Output
In program.cs, on
app.UseWorkflowsApi();
System.ArgumentNullException: 'Value cannot be null. (Parameter 'databaseName')'
Troubleshooting Attempts
Setting the desired Database as the default auth DB is a workaround, as long as you do not use an auth DB that differs from the Elsa DB.
The text was updated successfully, but these errors were encountered: