Why do I need a connectionstring called LocalSQL Server?
Posted on 2016-07-21
I have about 8 web based GUIs.
My web.config file has 4 connection strings depending on which site the user logs into (dev, QA, production or disaster recovery).
The program looks at C:\inetpub\wwwroot\win.config to find out which site the user has logged into.
I’ve done this for my GUIs. Most of them authenticate by checking if the user’s TEN ID is in web.config. However, I have one GUI where the user must enter their name and a password that they choose.
I get an error message because there is no connection string named LocalSQLserver.
Since I have 4 connection strings (dev, qa, prod and DR), I deliberately made sure that none were called LocalSQLServer, so I could be sure that my GUI was connecting to the correct database.
Did you have a problem like this? If so, how did you get round it?
I know that localSQLServer appears in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Machine.config, but I don’t see why that matters.