title: Entity Framework Deployment Issues
body: <p>Entity Framework is new to me i follow the example below to create a wcf service with entity framework.</p>
  
  <p><a href="http://www.codeproject.com/Articles/363040/An-Introduction-to-Entity-Framework-for-Absolute-B" rel="nofollow">Introduction for Entity Framwork for Beginner</a></p>
  
  <p>It is pretty simply, all the thing was like auto generated, my database was located in my app_data folder. So after go it running in visual studio, I want to publish and deployment to IIS server.</p>
  
  <p>But when I try to run it in server, it return me this error</p>
  
  <pre><code>The underlying provider failed on Open.
     at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure)
     at System.Data.EntityClient.EntityConnection.Open()
     at System.Data.Objects.ObjectContext.EnsureConnection()
     at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
     at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()
     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
  </code></pre>
  
  <p>here is my connectionstring in web.config</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="BPMCommonEntities" connectionString="metadata=res://*/BPMCommonDB.csdl|res://*/BPMCommonDB.ssdl|res://*/BPMCommonDB.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\BPMCommon.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I havent change anything in it, and doesn't know what to change either.</p>
  
  <p>What am I missing? where is this error coming from, what should i change to fix this?</p>