Here is my App.Config
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<clear/>
<add name="con1" connectionString="..." />
<add name="con2" connectionString="..."/>
<add name="con3" connectionString="..."/>
<add name="con4" connectionString="..." />
<add name="con5" connectionString="..."/>
</connectionStrings>
<appSettings>
<add key="S...
...
</configuration>
I have a breakpoint that I'm hitting right before I try to create a database connection, and in the Immediate Window
, I run this:
?ConfigurationManager.ConnectionStrings.Item(0).ConnectionString
but it returns this:
"data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
Which isn't defined anywhere. (All my connections are remote MSSQLServer instances)
doing ?ConfigurationManager.ConnectionStrings(1)
gives an Index out of range error, so there is only one entry in my connection strings settings object :-(
What's going on? this feels crazy.
I'm using VS2013, VB.NET, and .NET 4.0