Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nils Dickner 4 posts 74 karma points
    Sep 20, 2018 @ 14:35
    Nils Dickner
    0

    Unable to install Umbraco Forms in a Azure swap environment

    Hey,

    I have a site which uses swap functionality in Azure. My problem is when I try to add Umbraco Forms to my site, my production site does not install Umbraco Forms properly since it was swapped with stage(which work proberly since it was deployed from VS). All I get is when I click on the Forms section a big red error with the text "see log".

    I Looked into the log and got this ("only a fraction of the error")

    ERROR Umbraco.Forms.Web.Editors.FormController - Unhandled controller exception occurred System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'UFUserSecurity'.

    I am storing data with Umbraco Azure Blob Provider.

    Does Umbraco Forms support swap functionality?

    // Nils

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 20, 2018 @ 14:50
    Kevin Jump
    0

    Hi Nils,

    you can get Umbraco Forms working with Azure and slot swapping, but the Forms installation needs to be done as part of your build and deployment.

    to that end you need to install forms via nuget in to your Visual Studio Solution :

     PM> Install-Package UmbracoForms
    

    Like you say you also need to be using the Azure Storage for the forms data but it sounds as if you have that bit.

  • Nils Dickner 4 posts 74 karma points
    Sep 20, 2018 @ 14:59
    Nils Dickner
    0

    Hi Kevin,

    I have UmbracoForms already installed as nuget and, as i said, the stage environment(the environment which VS deploys to, works fine). But when I then swaps to production(i.e stage to production), the production fails.

    Maybe since it is not deployed to production?

    One notice! My stage and production environment uses totally different db and blobstorage.

    // Nils

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 20, 2018 @ 15:04
    Kevin Jump
    0

    It sounds a bit like the DB Migrations haven't ran correctly on the live site :( (so the tables are missing?)

    There is a table in the umbraco DB called UmbracoMigration, that is used by the migration code to work out what has been installed, if you removed the UmbracoForms entries from this table then that would force the migrations to run again next time your website started up, and this might get the DB elements created correctly?

  • Nils Dickner 4 posts 74 karma points
    Sep 20, 2018 @ 15:29
    Nils Dickner
    0

    Precisely! If you mean all the tables starting with UF... (Can see them in Stage db)

    I have removed Umbraco forms from UmbracoMigration table and restarted the website(in production environment). No success! It does not create the UF tables. only adding a entry to UmbracoMigration.

    Hm... Something wrong with the recreation of tables.....

    // Nils

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 20, 2018 @ 15:31
    Kevin Jump
    1

    Hi yeah - check the logs - maybe its a permissions issue in the DB that the account can't create the tables ?

  • Nils Dickner 4 posts 74 karma points
    Sep 28, 2018 @ 06:08
    Nils Dickner
    0

    Hey,

    Thank you for the help. I solved the problem by redeploying all the environments.

    // Nils Dickner

Please Sign in or register to post replies

Write your reply to:

Draft