Orchard Core CMS on Linux Azure Weapp

Jamie Tway 1 Reputation point
2021-09-03T18:13:52.87+00:00

When publishing a new Orchard Core CMS project to an Azure Linux Web App it fails to start. Checking the logs seems to indicate that it fails to start due to a Read Only File System error when System.IO.FileSystem.CreateDirectory() is called. The app, when first starting, will create an App_Data folder etc.

How do I give the app the required permissions?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,471 Reputation points
    2021-09-04T18:48:43.95+00:00

    Hi,

    Following link seems to provide an working solution for deploying Orchard Core to Azure.

    Can you give that a try?

    Hope this helps.


  2. BhargaviAnnadevara-MSFT 5,466 Reputation points
    2021-09-16T10:21:33.77+00:00

    @Jamie Tway Thanks for reaching out. I'm afraid this could be a known issue with running OrchardCore on Azure App Service for Linux.

    This issue from the OrchardCore repo has more details: OrchardCMS/OrchardCore#4600

    As per @Tim Heuer 's comment:

    Deploying OrchardCore to Azure App Service Linux works, but does not run properly. This is likely due to SQLite and database being locked. I'm not getting good logging to know if that is the case, but it has been with others. Any task that attempts to write new data fails and crashes the app.

    @sebastienros's follow up comment explains why:

    We looked and confirmed that this is a known limitation of sqlite with CIFS on linux, the shared drive protocol that the Azure Web Service is using. There is nothing that can be done here, as any lock from sqlite (on any write) won't be released and the transaction will timeout eventually.

    If feasible, you could evaluate the following to work around the issue:

    It's not an issue on Azure App Service for Windows. And another solution is to use SQL Server or any other server database when using Azure App service for Linux. It will work on Docker as long as the sqlite file is not on a shared drive.

    Here is another similar comment from OrchardCMS/OrchardCore#3643 from a few months ago:

    SQLite is not supported on Azure App Services for Linux due to the locking protocol it uses that is not supported.

    Using WAL journal moded might solve the issue, can you try? It's an argument to set in the connection string. Might need to set it in the code that creates the connection string though still it's not editable in the Setup screen.

    If this doesn't help, please follow up on the above referenced posts elaborating your requirement, or open a new one here.

    Hope this helps. Do let us know if you have further questions.


    If an answer is helpful, please "Accept answer" and/or "Up-Vote" which might help other community members reading this thread.

    0 comments No comments