title: Server Error in Application. Invalid object name 'dbo.Categories'
body: <p>I am working on a Online Shopping Web Apps using ASP.NET and Entity Framework c#. The problem is that my application runs fine when I test it on my local ASP.NET Development Server, but when I host the website, it gives the following error:</p>
  
  <blockquote>
    <p>Server Error in '/samarth' Application.
        Invalid object name 'dbo.Categories'.</p>
  
  <pre><code>Description: An unhandled exception occurred during the execution of the current web 
  
  request. Please review the stack trace for more information about the error and where it originated in the code.
  
  Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.Categories'.
  </code></pre>
  </blockquote>
  
  <p>Is there something wrong with the connection string?</p>
  
  <pre><code>&lt;connectionStrings&gt;
          &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/&gt;
          &lt;add name="CommerceEntities" connectionString="metadata=res://*/Data_Access.EDM_Commerce.csdl|res://*/Data_Access.EDM_Commerce.ssdl|res://*/Data_Access.EDM_Commerce.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Commerce.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient"/&gt;
      &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Got this error: </p>
  
  <blockquote>
    <p>The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.</p>
  </blockquote>