Import Lightswitch 2013 app via IIS/Deploy wizard - fails on SQL generation - HTML client. RRS feed

  • Question

  • I've been struggeling with this for sometime now. And keep getting "An error occured during the execution of the database script..........The error occured between the following lines of the script "5963" and "5982"....DECLARE @currentUser nvarchar(128)"

    The scenario is that this is a server with no internet connection. So I had to go through webpicmd.exe on a laptop downloaded all the necessary file whith VSLS4NOSQL. Memorystick to server and then installed the prereqs.

    The database server is set to Windows Auth. only and I am not allowed to set this to mixed mode. I had set up the application with ad authentication, then forms and now nothing just to test. I still keep getting the same ******* error.

    I have also tested it in a dev environment but same message here.

    The db gets created on the SQL server, but thats about it. Paul van Bladel mentioned something about running the script directly on the SQL server, but it keeps popping up with even more errors. If someome could please give me the babysteps on how to perform an installation by importing a LS application and getting it up an running I would be very thankful (what I have found of information so far, doesn't help me much)

    Tuesday, January 20, 2015 10:51 AM

All replies

  • A little update here.

    What I did next was to deploy only the webapplication, and uncheck the Deploy SQL database, and SQL script.

    The application gets installed, and I am able to browse to it, but it shows up with a red line and the message Request failed with status code 0 and status text ".

    I made another LS app just for testing, and it throws me the same message. I am guessing it is something with the connection to the db, but not sure what.

    Tuesday, January 20, 2015 1:28 PM
  • More update to my problem. When I run the script (i think I got it working)

    I remove the asterisk around:setvar DatabaseName and so on. I then add a :setvar DatabaseuserName and if I set it to a SQL account I create the script runs through. But I can't get it to connect from the frontend it seems.

    As I mentioned in the first post I really would be thankful for any baby-step guidance to this.

    Tuesday, January 20, 2015 2:09 PM
  • Please somebody must have experience the same thing as me here??

    Here are the steps I've been doing so far

    1. I create a new website in IIS (and create a new folder for my LS webapplication under inetpub)

    2. Website gets created, I then under Deploy, chose import application, browse to the zip file, and then chose next.

    3.Leave everything checked under Package contains...

    4. Enter conncetion string, with name of SQL Server and DBname, under credentials I set it to Use Windows Integrated Security (the other options keeps failing on me)

    5. Enter the name of the databaseserver again, and same with DBName

    6. Under DBUserName I enter the credentials for a user I created on the SQL Server with SQL Server authentication as I can't seem to use Windows Auth. here.

    7. Enter the application path (I set it here to the folder I created under inetpub).

    8. The Package starts to deploy, everything seems fine. But it comes up with a warning "Cannot connect to the database 'databasename'

    9. In IIS I then go to Basic Settings and edit the Physical path to C:\inetpub\path\HTMLClient, I have also edited the hostfile.

    10. I start the website and browse to it, the page loads, but with a nice fat red line saying

    Request failed with status code 0 and status text ".

    11. In Edit Site-->Connect as --> It is set to Application user, and the AppPool for the application is set to ApplicationPoolIdentity.

    12. As for now I have set no authentication in the LS app I made, but I would when I get this to work set it to Forms Based or Windows/AD auth for users in the domain.

    Wednesday, January 21, 2015 12:10 PM
  • Hi hasse,

    Thanks for your feedback.

    We can choose the Create a script file to install and configure the database check box, which creates a script file that runs during installation, after SQL Server is installed and configured. Use this option when you want to install SQL Server as a part of the installation or when you are publishing an application to an existing database. From you description above, you can refer to this article to check your deployment procedure. See: Publishing the Application.

    At the same time you can also enable diagnose in your LS application, it will give more hints to troubleshoot.

    If you have any concern, please let me know.  

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 21, 2015 12:32 PM
  • Thanks for your reply Angie. I can unfortunately not find anyhting in the referenced page that helps me.

    So again, anyone who has experience this with their deployment please I need all the help I can get here.

    Wednesday, January 21, 2015 1:20 PM
  • *bump*

    Thursday, January 22, 2015 9:05 AM