Home  /  Questions  /  Question

50   50
Dec 08, 2014

4.5 connection string is empty in VS 2013 Premium


Jack might not see one additional comment after his comment.
I have met the same empty connection string problem in VS 2013 Premium version.
Detail information is exactly same to the last article by Archie, so please look into this problem again.

Thank you so much.

50   50
Dec 09, 2014
Now I come to think of this issue, it may not be a problem of 4.5 framework.
I have changed the index from number to string as below, then it works properly.
Thanks for the reading.

if (conn == null) // index is 1 because 0 = localdb        
        connectionString = ConfigurationManager.ConnectionStrings[1].ConnectionString;
        connectionString = ConfigurationManager.ConnectionStrings["Action"].ConnectionString;
Thanks for sharing this! --- Jack Poorte  Dec 09, 2014
I have encountered such a problem, the answer can be found here - www.casestudywriter.org . --- Dave Gerber  May 16, 2017