title: How to not get "Migrations is enabled" error message for a shared hosting server deployment where you can't run Update-Database command
body: <p>EF Code First works on my localhost. However the problem occurs when I publish it to 1and1.com shared windows hosting. I can't connect via management studio so I guess the shared hosting doesn't support remote client connections. The Package Manager Console's Update Database can also not remote connect.</p>
  
  <p>My config connectionstring is</p>
  
  <pre><code>&lt;add name="DefaultConnection" connectionString="Data Source=dbXXXXXXXX.db.1and1.com;Initial Catalog=dbXXXXXXXX;User Id=username;Password=password;" providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>I copied my local sql from my package manager console to recreate the database through 1and1.com's web interface called myLittleAdmin. </p>
  
  <p>I get the following error when I access the /Account/Register url</p>
  
  <blockquote>
    <p>Migrations is enabled for context 'MyCustomDb' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Console.</p>
  </blockquote>
  
  <p>I tried to disable migrations
  In my Global.asax I commented out the simplememebership provider Initialize</p>
  
  <pre><code>WebSecurity.InitializeDatabaseConnection("DefaultConnection", "Users", "UserId", "UserName", autoCreateTables: true);
  </code></pre>
  
  <p>It did previously create the membership tables for me so it means the connection works</p>
  
  <p>In my Db project in my solution where entity framework is installed I set automatic migrations as false</p>
  
  <pre><code>  public Configuration()
          {
              AutomaticMigrationsEnabled = false;
          }
  </code></pre>
  
  <p>I still get the same "Migrations is Enabled" error after publishing it via FTP.
  I just don't want to get an error. How do I get around this?</p>
  
  <p>I could delete my Migration folder that contains Configuration.cs in it but then the seed method won't work.</p>