Skip to content
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

No connection string for Sql Event Journal was specified #4343

Closed
ismaelhamed opened this issue Mar 17, 2020 · 3 comments · Fixed by #4345
Closed

No connection string for Sql Event Journal was specified #4343

ismaelhamed opened this issue Mar 17, 2020 · 3 comments · Fixed by #4345

Comments

@ismaelhamed
Copy link
Member

Akka: 1.4.2 (but might be affecting more versions)

Looks like the preprocessor directive CONFIGURATION is not defined for NETStandard, which in this case is preventing from loading the connection-string-name from configuration.

@Aaronontheweb
Copy link
Member

thanks for reporting this are you planning on submitting a PR? If so, we'll do a new 1.4.3 release ASAP.

@ismaelhamed
Copy link
Member Author

Maybe there's more to it than I anticipated.

If I'm not mistaken, the following code will only retrieve the connetionString from an app.config, but what if this was an ASP.NET Core using an appsettings.json? Wouldn't we need to use Microsoft.Extensions.Configuration instead in that case?

#if CONFIGURATION
if (string.IsNullOrWhiteSpace(connectionString))
{
connectionString = System.Configuration.ConfigurationManager
.ConnectionStrings[config.GetString("connection-string-name", "DefaultConnection")]
.ConnectionString;
}
#endif

@Arkatufus
Copy link
Contributor

The CONFIGURATION compiler directive is App.config specific, Microsoft.Extensions.Configuration support is on the development road map, but it won't be implemented just yet.

This was referenced Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants