Share via


Deploying LightSwitch Applications

You deploy your finished LightSwitch applications to make them available to users. The process of deploying a LightSwitch-based application differs depending on the application type and deployment scenario that you select.

The possible deployment scenarios are:

  • Desktop client, 2-tier. This deployment scenario creates an application that runs on the end-user’s Windows desktop. The database and server components run on a networked computer.

  • Desktop client, 3-tier. This deployment scenario creates an application that runs on the end-user’s Windows desktop. The database and server components run on a server that is running Internet Information Services (IIS) or on Windows Azure.

  • Browser client, 3-tier. This deployment scenario creates an application that runs in the end-user’s web browser. The database and server components run on a server that is running IIS or on Windows Azure.

The application type can be set in the Application Designer. For more information, see How to: Change the Deployment Topology and Application Type

There are two ways to deploy a LightSwitch-based application, by either publishing or packaging it. In either case, the LightSwitch Publish Application Wizard guides you through the deployment process. You can launch the LightSwitch Publish Application Wizard by clicking Publish <application name> on the Build menu, or by clicking the Publish button on the Application Type page of the Application Designer.

  • A published application can be run on client computers immediately after the wizard has been completed. The application is ready to install and the installation automatically deploys the database schema to SQL Server. You must have administrative access to the computer in order to deploy the database schema.

  • A packaged application means that everything that is required to run the application is bundled together, but additional steps must be taken to make the application available to the user. Choose this option when a server administrator will be installing the application and database schema. For more information, see How to: Install a LightSwitch Application on a Server.

Updates to a LightSwitch-based application can be deployed by running the wizard again. 3-tier browser clients need only re-navigate to the web page to get the updated version. 2-tier desktop clients will automatically receive the updates the next time they are run.

Publishing a 2-tier desktop application

To publish a 2-tier desktop application, choose Desktop and Run application services on the end user’s machine on the Application Type page of the Application Designer, and click the Publish button to display the LightSwitch Publish Application Wizard.

Additional options in the wizard differ depending on the choices you have made for your application. For more information, see How to: Deploy a 2-tier Application.

Once the application is published, users can install it from the publish location that you specify in the wizard by double-clicking the Setup.exe file.

Note

You will need to pre-configure the client computer, following the instructions in the Install.htm file. The file is published to the same location as the Setup.exe file.

Publishing Updates

To publish updates to the application, update the Application version on the General Properties page of the Application Designer. Run the LightSwitch Publish Application Wizard again. The next time the user runs the application they will automatically receive the update from the publish location.

Uninstalling

An end user can uninstall a 2-tier desktop application from Programs and Features or Add and Remove Programs in Control Panel.

Publishing a 3-tier application

Publishing a 3-tier application requires that you have administrative access to a server that is running IIS and is preconfigured for LightSwitch, and also that you have administrative access to a computer that is running SQL Server. For more information, see How to: Configure a Server to Host LightSwitch-Based Applications.

The publishing process is the same for both desktop and browser applications. To publish a 3-tier application, choose either Desktop or Web and Host application services on an Internet Information Services (IIS) Server on the Application Type page of the Application Designer, and click the Publish button to display the LightSwitch Publish Application Wizard. To publish a 3-tier application to Windows Azure, see How to: Host an Application on Windows Azure.

On the Publish Output page of the wizard, select the Remotely publish to a server now option. Additional options in the wizard differ depending on the choices you have made for your application. For more information, see How to: Deploy a 3-tier Application.

Once the application is published, users can install it from the web site that you specify in the wizard by clicking the <ApplicationName> link, where <ApplicationName> is the display name of your application. For a desktop application, the user will be prompted to install. For a Web application, the application will open in the web browser.

Publishing Updates

To publish updates to the application, update the Application version on the General Properties page of the Application Designer. Run the LightSwitch Publish Application Wizard again. The next time that the user runs the application they will automatically see the new version.

Uninstalling

An end user can uninstall a 3-tier desktop application from Programs and Features or Add and Remove Programs in Control Panel. Browser applications must be uninstalled from the server by the IIS administrator.

Packaging a 3-tier application

A packaged 3-tier application generates everything necessary to install the application on an Internet Information Services (IIS) host. The publishing process is the same for both desktop and browser applications. To package a 3-tier application, choose either Desktop or Web and Host application services on an Internet Information Services (IIS) Server on the Application Type page of the Application Designer, and click the Publish button to display the LightSwitch Publish Application Wizard. On the Publish Output page of the wizard, select the Create a package on disk option. Additional options in the wizard differ depending on the choices you have made for your application. For more information, see How to: Deploy a 3-tier Application.

Once the application is published, a .zip file that contains the package is placed in the publish location that you specified in the wizard. Once this package has been created, a server administrator can deploy the application to servers that are running IIS and SQL Server. For more information, see How to: Install a LightSwitch Application on a Server.

Publishing Updates

To publish updates to the application, update the Application version on the General Properties page of the Application Designer. Run the LightSwitch Publish Application Wizard again. The next time that the user runs the application they will automatically see the new version.

Uninstalling

An end user can uninstall a 3-tier desktop application from Programs and Features or Add and Remove Programs in Control Panel. Browser applications must be uninstalled by the IIS administrator.

See Also

Tasks

How to: Change the Deployment Topology and Application Type

How to: Install a LightSwitch Application on a Server

Concepts

How to: Deploy a 2-tier Application

Other Resources

Deployment: Distributing and Maintaining Your Application

How to: Deploy a 3-tier Application

How to: Host an Application on Windows Azure