Publishing LightSwitch Applications



When LightSwitch applications are deployed to another server or Web host, the application does not automatically port some of the settings and dependencies needed for it to work on a machine different from the one it was developed on. This article walks through the process of deploying a LightSwitch application to a new host that uses any of the CData ADO.NET Data Providers.

Modify the Web.config

On your local machine, there is a machine.config file where your Data Providers are registered. You will need to copy some settings from this file into your Web.config file.

  1. Open a window and browse to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config.
  2. Open machine.config with a text editor.
  3. Search this file for the system.data section. It should look like this:
    <system.data>
      <DbProviderFactories>
        ...
        <add name="CData QuickBooks Data Provider" ...></add>
        ...
      </DbProviderFactories>
    </system.data>
  4. Add the full system.data section to the Web.config file in your published LightSwitch application.
  5. Remove all ADO.NET Data Providers that your application does not use or that come installed with Visual Studio.

Add Missing DLLs

Follow the steps below to add the needed DLLs to the finished project.

  1. In your published LightSwitch application, add any missing .dll files to the bin directory. These must be .NET 4.0 DLLs.
  2. For example, if you are using the CData QuickBooks Data Provider, you would need to add the System.Data.CData.QuickBooks and System.Data.CData.QuickBooks.Entities DLLs. These can be found in C:\Program Files\CData\CData QuickBooks Data Provider\lib\4.0
 
 
Downloads