Articles → LIGHT SWITCH 2011 → Deploy Lightswitch Web Application Connected To External Database

Deploy Lightswitch Web Application Connected To External Database






Prerequisites




  1. Visual studio 2010 is installed on your machine.
  2. Visual Studio 2010 service pack 1 is installed on your machine.
  3. Microsoft Visual Studio Light switch 2011 is installed on your machine.




  1. How to create a project in visual studio?
  2. Basics of lightswitch like screens entities
  3. How to add external data source in lightswitch?
  4. Basics about IIS
  5. What is the authorization and authentication?

Steps Involved




  1. Create a table with data in database
  2. Add existing data source and editable grid screen
  3. Publish your application
  4. Configure the environment
  5. Run the application

Create A Table With Data In Database




Picture showing the schema of the sample table
Click to Enlarge

Picture showing the records in the sample table
Click to Enlarge


Add Existing Data Source And Editable Grid Screen




Picture showing the external data source added in the lightswitch project
Click to Enlarge




Publish Your Application


  1. First of all open visual studio in admin mode and open the project.
  2. Change the configuration from debug to release.
  3. Now, right click on project and click on publish as shown below
  4. Picture showing the publish option in the context menu for publishing the application
    Click to Enlarge



    Picture showing the first screen of the publish wizard to specify the application type
    Click to Enlarge

  5. Click on next


  6. Picture showing the second screen of the publish wizard for selecting the hosting environment
    Click to Enlarge

  7. Click next


  8. Picture showing the third screen of the publish wizard for selecting the deployment type
    Click to Enlarge





  9. Click Next.


  10. Picture showing the fourth screen of the publish wizard for specifying the database connection string
    Click to Enlarge

  11. Click Next.


  12. Picture showing the fifth screen of the publish wizard for specifying the certificate
    Click to Enlarge

  13. Click Next


Picture showing the final screen of the publish wizard
Click to Enlarge



Picture showing the application deployed on IIS server
Click to Enlarge


Configuring The Environment




Picture showing the popup window that appears on click on the Basic Settings in IIS
Click to Enlarge



Picture showing the window to check if the user is authenticated or not
Click to Enlarge





Picture showing a window for adding user credentials for authentication
Click to Enlarge



Picture showing the window to enter user credentials
Click to Enlarge





Picture showing the test connection window for authentication and authorization
Click to Enlarge





Picture showing enabling the Anonymous Authentication and ASP.NET authorization
Click to Enlarge


Run The Application




Picture showing the deployed lightswitch application on IIS
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, May 10, 2014

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250