G
Guest
In 2.0 when I access the ConnectionStringSettingsCollecion using the integer
index rather than declaratively using the key of the configuration element I
get a SQLExpress connection string which I haven't defined myself at the
reference zero. E.g.
string s = ConfigurationManager.ConnectionStrings[0].ConnectionString;
After running this s evaluates to
{data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}
Of course the connection string at location 1 is the first specified stirng
in the config file.
Whats this all about then? I can't find any mention of this in the docs, or
anybody talking about it, and I can't find anyway to stop it. I had a quick
nose in reflector but didn't find anything useful quickly.
Anybody else come across this and can explain why its there at all and how
to get rid of it.
Cheers
Rob
index rather than declaratively using the key of the configuration element I
get a SQLExpress connection string which I haven't defined myself at the
reference zero. E.g.
string s = ConfigurationManager.ConnectionStrings[0].ConnectionString;
After running this s evaluates to
{data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}
Of course the connection string at location 1 is the first specified stirng
in the config file.
Whats this all about then? I can't find any mention of this in the docs, or
anybody talking about it, and I can't find anyway to stop it. I had a quick
nose in reflector but didn't find anything useful quickly.
Anybody else come across this and can explain why its there at all and how
to get rid of it.
Cheers
Rob