locked
Visual Studio 2015 LightSwitch Deployment Problems RRS feed

  • Question

  • Hello,

    I have the following development server:

    • Microsoft Windows Server 2012 R2
    • Microsoft SQL Server 2016 Express Edition
    • Visual Studio 2015 Community Edition

    I have the following production server:

    • Microsoft Windows Server 2012 R2
    • Microsoft SQL Server 2016 Express Edition
    • Web Deploy 3.6

    I created the following simple Lightswitch application:

    • Forms Authentication
    • HTML Client
    • Desktop Client that is run from the browser
    • SQL Server database

    Works fine in the dev server.  Publish it to a package on the dev server and then deploy it to the prod server in IIS with the following results::

    • The package was installed successfully.
    • The following actions were performed:
    • Added 1 databases
    • Added 13 directories
    • Added 83 Files
    • Warning: Cannot connect to the database ‘EventPlanner’
    • Retrying operation ‘Add’ on object dbFullSql (server=prd.ghikas.prv;database= EventPlanner;integrated security=true). Attempt 1 of 5.

    I am prompted for an application admin during deployment but the user is not created in the user table in SQL Server.

    I receive the following error when I test the Desktop client in the browser:

    • Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.

    I receive the following error when I test the HTML client

    • Request failed with status code ‘404’ and status text ‘Not Found’.

    Suggested on the web that I should use .net 4.0 instead of .net 4.6.  Not sure what dev and prod architecture this would apply to.  I believe VS 2015 requires 4.6.  

    Found this interesting post on stackoverflow that talks about the wrong versions of odata being added to the publish package.  Replaced the 5.6 odata dlls in the package with 5.0 versions but no luck.

    Made a new version of my prod server from a copy of my dev server.  Tried to deploy it to the server with the same results.

    Thoughts anyone?

    Thanks,

    Dave





    Tuesday, February 28, 2017 4:41 PM

Answers

  • Hello Ian,

    Thanks for your response, it helped me in solving my problem.

    I followed the procedure you mentioned to prepare a server to host a LightSwitch application but I neglected to install the LightSwitch server runtime.  I mistakenly thought that this step would be executed by either Web Deploy 3.6 or through the act of deploying the published LightSwitch package to the hosting server.

    Installing LightSwitch 2015 runtime took a little work.  I couldn’t find LightSwitch 2015 runtime in either Visual Studio 2015 or in the Web Platform Installer 5.0 so I used the fix here to install LightSwitch 2013 Runtime (aka “Lightship in Visual Studio 2013 – Server Configuration without local SQL Express”) to install it from the Web Platform Installer 4.6.

    I have not done extensive testing on the production server but I have been able to bring up the login page so I believe I am out of the woods for now.

    Thanks again,

    Dave 





    Friday, March 3, 2017 3:47 PM

All replies

  • A couple of notes.

    1. You need .Net Framework 4.6 on the server.

    2. Make sure that this procedure is followed to get all the pre requesites.

    3. It seems to me that you are not creating the database. Does the database exist in SQL Server? Does the Publish Wizard > Data Connections > ... Test Connection work?

    Tuesday, February 28, 2017 5:51 PM
  • Hello Ian,

    Thanks for your response, it helped me in solving my problem.

    I followed the procedure you mentioned to prepare a server to host a LightSwitch application but I neglected to install the LightSwitch server runtime.  I mistakenly thought that this step would be executed by either Web Deploy 3.6 or through the act of deploying the published LightSwitch package to the hosting server.

    Installing LightSwitch 2015 runtime took a little work.  I couldn’t find LightSwitch 2015 runtime in either Visual Studio 2015 or in the Web Platform Installer 5.0 so I used the fix here to install LightSwitch 2013 Runtime (aka “Lightship in Visual Studio 2013 – Server Configuration without local SQL Express”) to install it from the Web Platform Installer 4.6.

    I have not done extensive testing on the production server but I have been able to bring up the login page so I believe I am out of the woods for now.

    Thanks again,

    Dave 





    Friday, March 3, 2017 3:47 PM