LightSwitch Deployment - Standalone? RRS feed

  • Question

  • I've tried to look around and see if there answer to this on the forums (here and elsewhere), but I never really find the answer I'm looking for, so I'll ask here.

    I'm trying to create a standalone application in LightSwitch (via VS2012), and get some weird hang ups when setting the deployment options.  I've ensures that it's first set to "Local" in the publisher, and then I've pointed the database settings to look at the local installation of SQL Express on the target machine.  I saw on a few forums that this is simply placing "./SQLEXPRESS" in the server name field.  Then I set the create new database option, with a unique name, and set the option to Create the script to create the database; as opposed to the Publish Now option. 

    When I install the application on the target pc, I can see that it's installing the version of SQL Express I've packaged, and runs the install fine.  When I launch that app; I'll either get user authentication issues, or cannot create dbo."objectname".object errors, or it tries to find the development pc.  Creating users for the application is something that is planned for this app; however, no users were set up in the app.  I've went so far as enabling the Forms Authentication in the project settings and made a generic Admin account.  Didn't work; the error would state that the account didn't have permissions to write to the database.  I put that same account name in the SQL Server settings during publishing, and still wouldn't work.  I've tried to enable Windows Authentication, but since we're not using a server at this point, that didn't work either.

    I've created the Application with .Net4.0 and running SQL Express 2008R2.  The target machine that I'm trying to install to is a Windows 7 Professional.  I'm also trying to deploy it to a Windows XP machine, but I hear that's another can of worms in itself.

    My main goal right now is to get this application to run all services on the target PC, without the need for a server or LAN or any other computer at all.  The PC is not connected to the internet, nor is it connected to any LAN or server environment.

    Monday, August 19, 2013 1:52 AM


  • If you are going to publish with the "Create the script to create the database" option selected, you need to run the script on the SQL instance to which the application is trying to connect. The application is probably failing to get any information in the database because the database doesn't exist.

    Justin Anderson, LightSwitch Development Team

    • Marked as answer by Angie Xu Monday, August 26, 2013 2:20 AM
    Monday, August 19, 2013 4:35 AM