LightSwitch app publishing

Discussion in 'Windows / IIS' started by oneforfive, Aug 9, 2011.

  1. Hello,

    I am using the Knowledgebase instructions (#964) for installing a LighSwitch application. I get the following error in IIS 7 manager while publishing the app:

    An error ocurred during execution of the database script. The error occurred between the following lines of the script ...
    "CREATE TABLE [dbo].[RolePermissions] ("
    There is already an object named 'RolePermissions' in the database. ...

    Also,there is one step not mentioned in the Knowledgebase article. After submitting all of the publish details for the first time there was a screen:

    "You have chosen to install this application package to an existing application. Would you like to delete all the files on the destination?

    What is the correct response there?

    And finally, the Knowledgebase article calls for downloading and editing the web.config file to change "basicAuthentication" to false. Can't this be done right in the IIS interface without downloading and then uploading the web.config file?

    Thanks for any and all help.
     
  2. The deployment process will create a SQL script to build out the schema that you defined in your application. Its basically building a copy of the database you setup in your application. If the table is already there, it will fail as it assumes you are using a blank database.

    As for the issue regarding overwriting the application. If you already have something there, it will prompt you to see if you want it overwritten.
     
  3. reply to Chuck

    Thanks Chuck. What do you think about the error message that I referenced? Any ideas as to what will resolve it? Thanks much.
     
  4. Its really up to you how you want to deal with it. I just wanted to clarify what was being done behind the scenes. You could clear out your current database and then deploy if its just for dev/test stuff and you have no important data stored. Or if you cant because you have data in it, add another database just for stuff like this so you have a test bed. Thats what I would do. YMMV
     
  5. error occurs from first build and with overwrite or append data

    Hi Chuck. I had tried both options (append to existing or overwrite) after the initial publish failed with the error I quoted. I also edited web.config using the IIS manager to set basic authentication to false as suggested in the Knowledgebase. This was not a prerequsite for the initial publish according to the Knowledgebase but in any case it did not resolve the error. I have another app to publish and will follow the Knowledgebase procedure again but I have a feeling that there is something else that will need to be resolved.
     

Share This Page