Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Find DB Connection String in Visual Studio 2011 Files

Posted on 2013-06-17
6
Medium Priority
?
571 Views
Last Modified: 2013-06-17
Hello experts,

I wrote a program on my local machine that has a database connection to a local SQL Server and database instance.  

However, when I move the program onto the client machine, it throws me a connectivity error saying it cannot connect to the database, because that set of db creds doesnt work on that new machine.

I want to simply hard-code the new server name and database creds into the program config file, because I could do that in VS 2008 in the web.config file, but in VS 2011 I cannot locate the config file that holds that information.

Does anyone know where that lives?  What file?  I dont have access to VS on the client system to be able to simply load it all up there and use the application to connect to the correct server and db.

Thanks!
0
Comment
Question by:robthomas09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39253770
The configuration file should be in the same spot that it was in 2008. It is output right alongside the compiled executable. If you're creating a Forms or console application, the the output file's name will be "{YourExecutableName}.exe.config"; otherwise if you are creating a web application, the output file's name will be "web.config", just as it is within the solution.
0
 

Author Comment

by:robthomas09
ID: 39254024
Thanks for the reply!

I went to the directory where the exe is published and have attached a screenshot.  I dont have an .config files.   The other files appear to be encrypted or in a format notepad doesnt recognize too well.   I searched the entire directory for a *.exe.config file and one doesnt exist.  It's a Form report for sure - C#.

Any other ideas?

Thanks!
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39254063
I don't see a screenshot  = )
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:robthomas09
ID: 39254090
Whoops!  Attached, sorry.shot
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39254182
Ah. It appears that you're using ClickOnce deployment. This puts a copy of the configuration file into each user's profile folder (if they run the app). Try searching in "C:\Users\[username]\AppData\Local\Apps\2.0\[some random chars]\[some more random chars]\[a crazy name]" (Windows 7). For XP, the path will be slightly different.

 Screenshot
0
 

Author Comment

by:robthomas09
ID: 39254223
it was there - thanks!
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Simple Linear Regression

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question