So the problem is, that there is no unified way to get a connectionstring from the domain config.

If I use connectionString in my web config, then Domain.Current.Configuration.ConnectionInfo.ConnectionUrl is empty.

If I use connectionUrl in my web config, then Domain.Current.Configuration.ConnectionInfo.ConnectionString is empty.

It would be very useful to populate both properties in both cases

asked Sep 09 '10 at 04:07

xumix's gravatar image

xumix
425757682

edited Sep 14 '10 at 14:21

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Probably, we can populate ConnectionString by ConnectionUrl, but not vice versa.

(Sep 09 '10 at 09:40) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Sounds reasonable, will do.

I've opened the issue

answered Sep 09 '10 at 04:46

Dmitri%20Maximov's gravatar image

Dmitri Maximov
22111211

Probably, we can populate ConnectionString by ConnectionUrl, but not vice versa.

(Sep 09 '10 at 09:40) Alex Yakunin Alex%20Yakunin's gravatar image

I commented the issue.

(Sep 09 '10 at 09:46) Alex Yakunin Alex%20Yakunin's gravatar image

there are DbConnectionStringBuilder / SqlConnectionStringBuilder that helps you to parse connection string to make URL

(Sep 10 '10 at 04:37) pil0t pil0t's gravatar image

That's right

(Sep 10 '10 at 05:51) Dmitri Maximov Dmitri%20Maximov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574
×120
×52
×1

Asked: Sep 09 '10 at 04:07

Seen: 3,504 times

Last updated: Sep 14 '10 at 14:21

powered by OSQA