locked
Unable to install a lightswitch application RRS feed

  • Question

  • I've written my first Lightswitch application and am trying to install it on a test PC (using the latest version of VS Professional 2012, Update 2.

    I've installed SQL Server Express 2008 R2 on the target PC and SQL Server Studio, but when I run the <myapp.sql> it shows some error messages. The createuser.sql script also gives syntax errors.

    When the app runs, it doesn't show all the screens and gives the error message:

    Exception Message Details

    Value Object reference not set to an instance of an object.
    Resource ID Arg_NullReferenceException
    DLL mscorlib.dll
    Version 5.0.10411.00

    I've tried to read all I can on the web but am finding it so difficult just to get my application installed and running.

    Thanks for your help

    Paul

    Thursday, April 25, 2013 8:04 PM

Answers

  • Hi Paul,

    LightSwitch does not publish the Permissions created at Debug time to the destination database. Any permission-related code you wrote should be published though. Maybe you just need to launch the application and log in as the Administrator user created during publish, and add back the Roles / Permissions you need?

    See this MSDN article, section "Roles and Users".

    Best regards,
    Huy

    Tuesday, April 30, 2013 4:48 AM

All replies

  • Answerinng myself here, but the Arg_NullException is being generated when the app runs. I've tried using the standard shell, and commenting out OfficeIntegregation but it's still happening.

    I made a simple one-table CRUD application, which I was able to install and run ok on my test machine, so the error is obviously because of something in my app, which has dozen tables and two dozen screens.

    Anybody got any suggestions on how to debug this?

    Thanks so much


    Paul


    • Edited by Paul Cull Friday, April 26, 2013 6:38 PM
    Friday, April 26, 2013 6:34 PM
  • Still commenting to myself, sorry! I found a code error but my problem now seems to be that the security permissions have not been installed. Is anything magic needed so that Lightswitch copies across permission codes?

    Paul

    Saturday, April 27, 2013 12:10 PM
  • Hi Paul,

    LightSwitch does not publish the Permissions created at Debug time to the destination database. Any permission-related code you wrote should be published though. Maybe you just need to launch the application and log in as the Administrator user created during publish, and add back the Roles / Permissions you need?

    See this MSDN article, section "Roles and Users".

    Best regards,
    Huy

    Tuesday, April 30, 2013 4:48 AM
  • Thanks - by logging in as Administrator and tweeking my project to allow Security Administrator to access all my entities and screens, I was then able to recreate the security permissions for other users.

    Paul

    Friday, May 3, 2013 11:11 AM