We help IT Professionals succeed at work.
Get Started

Why do I need a connectionstring called LocalSQL Server?

AlHal2
AlHal2 asked
on
100 Views
Last Modified: 2016-07-25
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.
Comment
Watch Question
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 15 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE