LightSwitch – Deploying your application to a shared hosting provider

Are you as annoyed as I am about the cost to host your LightSwitch applications on Azure?  And as your number of applications increase, so does the cost.  Not to mention the annoying spin up time for your application once it has been idled out.

But then again, what are the options?  Visual Studio Publishing Wizard for LightSwitch no longer makes it easy to publish to 3rd party shared hosting.  And even the method it does provide, there is little documentation on how to accomplish this.  And THEN, what documentation is out there, seems to be way out dated and the instructions fail miserably.

What a mess.

Hopefully I can help you get back to being able to use shared hosting.  I’m going to step you thru the process that I use with my own hosting provider.  And show that once you are configured up, its really quite easy.  And fairly inexpensive!

Check it out… Deploying a LightSwitch application to SmarterASP.NET

8 thoughts on “LightSwitch – Deploying your application to a shared hosting provider

  1. Robert Weiss says:

    Hi Dale,

    Thank you for sharing this information. Actually I cant open your above links. I have signed up with shared hosting provider (asphostportal.com) and I also want to host my lightswitch site. Is it easy to deploy it to shared hosting environment? Previously I was setup my account at Azure, but they are quite costsly, so I switch to shared hosting environment

    • dwm9100b says:

      My apologize, my hosting provider had an outage. We’re back online now. Agree that Azure is expensive for these apps and shared hosting is the way to go. I have not worked with asphostportal yet. Most of the problem arises with the fact that the Visual Studio folks took away the option to publish when the certificate does not match location. Which is almost 100% of the hosters out there.

  2. Anas says:

    Hye Dale,

    Thank you so much for this solution. When I was using VS2012 I was deploying my apps to smarterAsp directly and attaching manually the .mdf database in the host.

    Now with VS2013 it’s not possible, so I tried to use your solution. Everything was ok until the final step of SQL Script generation.

    I opened an question in Lightswitch Forum, here is the link if you want to help me to recognize the issue.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/748d4ac3-b851-4e48-a86d-10a96fb53268/error-in-publishing-lightswitch-app-could-not-generate-the-deployement-script?forum=lightswitch

    Thanks in advance

    Anas

    • dwm9100b says:

      Hey Anas,
      This error has to do with your Visual Studio not being able to connect to the remote data source. Have you tried connecting with other SQL Tools like dbForge or SQL Manager?

    • dwm9100b says:

      Anas, After looking over your post at the forums, I believe I know what the issue is. I answered over there but will also here just in case.

      My answer at the forum…..

      Are you publishing to a hosted environment other than Azure? If so.. when you are going thru the publishing wizard and come to the Data Connections tab. That you DO NOT select the option to “Generate a new database”. It will fail every time.

      You need to create your empty database at the provider, then in the wizard, select “Update an existing database”.

      In fact, if you try to go with option 1. The providers SQL Server will, most times, take the database offline and it won’t be able to be brought back online. So your option then is to create another database with a new name and go down the Update vs Generate a new.

      Make any sense? If not, make sure you take a look at my video for deploying to a shared host. It shows exactly what I mean.

      dale

      • Anas says:

        Thank you Dale,
        I replied your answer in the VS Lightswitch Forum.
        It’s working fine now but only for “Publish directly to a server now”

        Great Blog by the way!!

  3. Johan Boot says:

    Thanks for this! Will try it out!

    • Johan says:

      Thanks Dale! This worked for me. Converted my production 700mb Azure website\db to smarterasp.net. I took an Azure bacpac backup, restored locally and uploaded the mdf. Both SSL and non-SSL works.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: