locked
Publish a lightswitch Application with External SQL server database to Azure site RRS feed

  • Question

  • I followed Beth Massi article about deploying Lightswitch application to Azure:

    http://blogs.msdn.com/b/bethmassi/archive/2012/10/18/easily-deploy-your-lightswitch-apps-to-azure-websites-in-3-minutes.aspx

    01. I created a site with empty SQL server database in Azure

    02. My lightswitch application has one external SQL server database which is running in my local machine

    03. I published the Lightswitch application to Azure with success.

    04. I checked the SQL server database in Azure, it has all ASP membership tables but none of my tables.

    05. So I used the tool called SQLAzureMW v3.9.7 to import the schema and the data from my local SQL Server to SQL Azure.

    06. The import was a success.

    07. I installed the lightswitch application from azure.

    08. The data from ASP membership tables is loaded just fine, like users and roles.

    09. But when I open a screen with external data, I keep getting this error:

    unable to load data. please check your network connection and try loading again

    Any body had this same issue?

    Thanks, Rachida


    Rachida Dukes



    • Edited by Rachida Wednesday, October 24, 2012 11:40 AM spelling
    Wednesday, October 24, 2012 1:30 AM

Answers

  • After step 6, you need to run through the publish wizard again and change the connection string on the "Attached Data Sources" tab of the "Data Connections" screen to point to the SQL Azure database that you created in steps 5-6.

    Hit the button next to the connection string and enter the server name, database name, user name and password to use (the server name will be <yourSQLAzureServerName>.database.windows.net)

    Once you do this your published app will be configured to hit your new external Azure DB.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by Dave KidderModerator Wednesday, October 24, 2012 2:36 AM
    • Marked as answer by Rachida Wednesday, October 24, 2012 7:54 PM
    Wednesday, October 24, 2012 2:36 AM
    Moderator

All replies

  • After step 6, you need to run through the publish wizard again and change the connection string on the "Attached Data Sources" tab of the "Data Connections" screen to point to the SQL Azure database that you created in steps 5-6.

    Hit the button next to the connection string and enter the server name, database name, user name and password to use (the server name will be <yourSQLAzureServerName>.database.windows.net)

    Once you do this your published app will be configured to hit your new external Azure DB.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by Dave KidderModerator Wednesday, October 24, 2012 2:36 AM
    • Marked as answer by Rachida Wednesday, October 24, 2012 7:54 PM
    Wednesday, October 24, 2012 2:36 AM
    Moderator
  • Thanks so much David. It works.

    Rachida


    Rachida Dukes

    Wednesday, October 24, 2012 7:54 PM
  • Thanks . This helped me and resolved my issue.
    Wednesday, July 16, 2014 3:04 AM