Sample Data Access app fails - Unable to connect to remote server

Topics: Data Access Application Block
Nov 9, 2013 at 12:58 AM
Trying to run the sample app...but get this vague error

Unable to connect to remote server, and cannot figure out where it is. Any help, thoughts or ideas. Sorry if this was asked, but couldn't find it in the threads.
Nov 10, 2013 at 3:04 AM
I'm assuming you mean the samples for the Developer's Guide to Microsoft Enterprise Library, 2nd Edition.

The connection string should point to a local database included with the sample:
  <add name="ExampleDatabase" connectionString="Data Source=(localdb)\v11.0;AttachDbFilename=|DataDirectory|\DataAccessExamples.mdf;Integrated Security=True"
    providerName="System.Data.SqlClient" />

Alternatively there are scripts included which you can use to create the tables in another database (e.g. SQL Server).

Randy Levy
Enterprise Library support engineer
Support How-to