title: Connecting ADO.Net entity data model to database
body: <p>I have a WPF application using an ADO.NET entity data model. After creating the <code>edmx</code>, a connection string is by default created in <code>app.config</code> like this:</p>
  
  <pre><code>&lt;add name="Entities" 
       connectionString="metadata=res://*/Model.DataAccess.DataModel.csdl|res://*/Model.DataAccess.DataModel.ssdl|res://*/Model.DataAccess.DataModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=servername;initial catalog=databasename;integrated security=True;user id=username;multipleactiveresultsets=True;application name=EntityFramework&amp;quot;" 
       providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>I use the entities in the code behind as follows:</p>
  
  <pre><code>Entities ent = new Entities();
  var tes = (from e in ent.testtable
  select e.name).tolist();
  </code></pre>
  
  <p>After I released the application, the users are not able to connect to the database. They get the error </p>
  
  <blockquote>
    <p>The underlying provider failed on Open.</p>
  </blockquote>
  
  <p>The users does not have access to the database, however since the credentials in the config file has the access, shouldn't the users be able to access the database.</p>
  
  <p>Please let me know if I am missing something here, as I am not able to figure out what I am doing wrong.</p>