If You Are Having Problems Connecting...

You can easily determine the right connection string for accessing your application data by copying the connection string from a Data Connection in Server Explorer.

  1. Open the Visual Studio Server Explorer by selecting View | Server Explorer from the menu.

  2. Right-click the Data Connections node and select Add Connection... from the shortcut menu. This displays the Add Connection dialog:

  3. In the Add Connection dialog, select the Data source and specify the Server name.

  4. In the Authentication combo box, select the authentication method you want to use.

  5. Select a database to connect to.

  6. Click the Test Connection button to make sure your connection is set up properly. When your test connection succeeds, click OK to close the dialog.

  7. In the Server Explorer, your new connection should appear under Data Connections. For example:

  8. Select the new data connection by clicking on it. Go to the Properties Window (if it's not visible, select View | Properties Window from the Visual Studio menu). In the Properties Window, double-click the Connection property shown on the left side of the Properties Window. This selects the entire connection string on the right:

  9. Press Ctrl+C to copy the connection string into the paste buffer, then go to your configuration file and paste this in as the value of your connection string. Note: If the string contains any double quotes, simply remove them. For example:

    <databases>
    	<add key="CustA\Northwind\Connection" value="Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework" />
    


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 02/12/26
Comment or report problem with topic