title: there was no connection string found in the web.config
body: <p>I am fairly new to ASP.NET and I have encounted the following problem whilst attempting to publish my application. When I click on the "Package/Publish SQL" button and then proceed to try import database entries from my web.config file I get an error that reads "There was no connection string found in the web.config"</p>
  
  <p>As you can see there is connection in my my Web.config</p>
  
  <p>Any help will be greatly appreciated.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=152368
    --&gt;
  
  &lt;configuration&gt;
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="1.0.0.0"/&gt;
      &lt;add key="ClientValidationEnabled" value="true"/&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true"/&gt;
    &lt;/appSettings&gt;
  
    &lt;connectionStrings&gt;   &lt;!--&lt;clear/&gt;
      &lt;remove name="LocalSqlServer"/&gt;--&gt;
      &lt;add providerName="System.Data.SqlClient" name="LocalSqlServer" connectionString="server=mydatabase\SqlExpress; database=AssetManager.Models.AssetManagerContext; Integrated Security=SSPI " /&gt;
    &lt;/connectionStrings&gt;
  
  
  
  
    &lt;system.web&gt;
      &lt;globalization culture="auto" uiCulture="auto" /&gt;
      &lt;roleManager enabled="true" /&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
  
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Calendar/Index?showLogin=1" timeout="2880" /&gt;
      &lt;/authentication&gt;
  
      &lt;membership defaultProvider="AssetManagerMembershipProvider"&gt;
        &lt;providers&gt;
          &lt;clear/&gt;
          &lt;add name="AssetManagerMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer"
               enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true"
               maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
               applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
  
      &lt;profile inherits="AssetManager.Models.ProfileModel" defaultProvider="AssetManagerProfileProvider"&gt;
        &lt;providers&gt;
          &lt;clear/&gt;
          &lt;add name="AssetManagerProfileProvider" type="System.web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer"/&gt;
        &lt;/providers&gt;
      &lt;/profile&gt;
  
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers" /&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
          &lt;add namespace="System.Web.WebPages"/&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
  
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false"/&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  
    &lt;system.net&gt;
      &lt;mailSettings&gt;
        &lt;smtp from="nathandavies.markdrummond@email.com"&gt;
          &lt;network
            host="smtp.gmail.com"
            port="587"
            password="!password"
            userName="nathandavies.markdrummond@email.com"
          /&gt;
        &lt;/smtp&gt;
      &lt;/mailSettings&gt;
    &lt;/system.net&gt;
  &lt;/configuration&gt;
  </code></pre>