Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you follow this tutorial: <a href="https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/" rel="nofollow">https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/</a> It'll show you how to connect Visual Studio (2012 in the example, not sure if works for any others) with Azure - basically you want to log into the portal, and download the publishing credentials. This will contain your database connection string, which you can then use to push code first migrations up to Azure.</p> <p>What it looks like you've done is manually added in properties to the app.config yourself. The way the publish works, it defines a local version in your .config file like thus:</p> <pre><code>&lt;entityFramework&gt; &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt; &lt;parameters&gt; &lt;parameter value="v11.0" /&gt; &lt;/parameters&gt; &lt;/defaultConnectionFactory&gt; </code></pre> <p></p> <p>Then, when you publish, VS will auto-magically insert the required stuff into your .config - if I go and FTP to my web site and look at the generated .config file, you see this: </p> <pre><code>&lt;contexts&gt; &lt;context type="Web_App.Models.TrackSafeDb, Web App"&gt; &lt;databaseInitializer type="System.Data.Entity.MigrateDatabaseToLatestVersion`2[[Web_App.Models.TrackSafeDb, Web App], [Web_App.Migrations.Configuration, Web App]], EntityFramework, PublicKeyToken=*******************"&gt; &lt;parameters&gt; &lt;parameter value="Web_App.Models.TrackSafeDb_DatabasePublish" /&gt; &lt;/parameters&gt; &lt;/databaseInitializer&gt; &lt;/context&gt; &lt;/contexts&gt; </code></pre> <p>So I'd try removing the extraneous stuff from your local app.config and re-publishing</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload