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.
- Open the Visual Studio Server Explorer by selecting View | Server Explorer from the menu.
- Right-click the Data Connections node and select Add Connection... from the shortcut menu. This displays the Add Connection dialog:

- In the Add Connection dialog, select the Data source and specify the Server name.
- In the Authentication combo box, select the authentication method you want to use.
- Select a database to connect to.
- 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.
- In the Server Explorer, your new connection should appear under Data Connections. For example:

- 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:

- 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
