Connection string not supported :(

60 views
Skip to first unread message

Justin A

unread,
Jul 24, 2017, 4:15:36 AM7/24/17
to RavenDB - 2nd generation document database

Just tried a new app today - and got this error:

"Connection string not supported"

Here's the code:

        var documentStore = new DocumentStore
        {
            ConnectionStringName = "RavenDb"
        };

Looking at the source "ConnectionStringParser.cs" ...

public static ConnectionStringParser<TConnectionString> FromConnectionStringName(string connectionStringName)
        {
#if !(MONODROID || DNXCORE50)
            var connectionStringSettings = ConfigurationManager.ConnectionStrings[connectionStringName];
            if (connectionStringSettings == null)
                throw new ArgumentException(string.Format("Could not find connection string name: '{0}'", connectionStringName));
        
            return new ConnectionStringParser<TConnectionString>(connectionStringName, connectionStringSettings.ConnectionString);
#else
            throw new ArgumentException(string.Format("Connection string not supported"));
#endif
        }

So is this code saying..

If you're in the newer stuff (.NET Core) or some monodroid stuff ... then bad luck, throw an exception because ConnectionStrings.cs might not exist, now that things have changed.

Otherwise ... give it a try...

Is that right? so the future ways would be to provide the full connection instead, which means .. how ever you read it in .. that's up to you.

-PK-

Oren Eini (Ayende Rahien)

unread,
Jul 24, 2017, 4:23:23 AM7/24/17
to ravendb
Hi,
Actually, we dropped support to connection strings entirely.
You are expected to provide the values yourself.
The primary reason for that was because we need X509 certificate, and we didn't want to force the user how to specify it.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin A

unread,
Jul 27, 2017, 8:36:13 AM7/27/17
to RavenDB - 2nd generation document database
Cheers Oren!
Reply all
Reply to author
Forward
0 new messages