Copied to clipboard

Flag this post as spam?

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


  • Steve A 2 posts 72 karma points
    May 30, 2023 @ 13:43
    Steve A
    0

    v11 deploy to Azure // page not found

    I am running v11.4. When I deploy to an Azure app service and navigate to the site, I get a page that says "Page Not Found". Digging into the logs, it says, "No physical template file was found for template {Template}".

    I have verified that the templates files are correctly deployed.

    I've followed the step listed here: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/runtime-modes#production-mode

    ...with the exception of ModelsMode, because then the build fails with razor errors about the models.

    How do I figure out why the site won't render in production? How do I deploy in release mode with ModelsMode set to Nothing?

    UPDATE:

    If I comment out Runtime:Mode:Production and ModelsBuilder:ModelsMode:Nothing in appsettings.Production.json, the site works as expected. Why is the site failing when these settings are enabled?

    appsettings.json

    {
      "$schema": "appsettings-schema.json",
      "Serilog": {
        "MinimumLevel": {
          "Default": "Information",
          "Override": {
            "Microsoft": "Information",
            "Microsoft.Hosting.Lifetime": "Information",
            "System": "Information"
          }
        }
      },
      "Umbraco": {
        "CMS": {
          "Global": {
            "Id": "a8971121-08c5-46d8-a5bb-b21156245d85",
            "ReservedUrls": "~/umbraco,",
            "ReservedPaths": "~/api/,~/app_plugins/,~/install/,~/mini-profiler-resources/,~/umbraco/,~/site-error/",
            "TimeOut": "24:00:00",
            "IconsPath": "~/images/icons",
            "SanitizeTinyMce": true
          },
          "Content": {
            "AllowEditInvariantFromNonDefault": true,
            "ContentVersionCleanupPolicy": {
              "EnableCleanup": true
            },
            "Error404Collection": [
              {
                "Culture": "default",
                "ContentKey": "1187"
              }
            ]
          }
        }
      }
    }
    

    appsettings.Production.json:

    {
      "Umbraco": {
        "CMS": {
          //"Runtime": {
          //  "Mode": "Production"
          //},
          "Global": {
            "UseHttps": true,
            "MainDomLock": "FileSystemMainDomLock",
            "Smtp": {
              "From": "[removed]",
              "Host": "[removed]",
              "Port": 465,
              "SecureSocketOptions": "StartTls",
              "DeliveryMethod": "Network",
              "Username": "[removed]"
              //"Password": "--ENVIRONMENT VARIABLE--"
            }
          },
          //"ModelsBuilder": {
          //  "ModelsMode": "Nothing"
          //},
          "WebRouting": {
            "UmbracoApplicationUrl": "[removed]"
          },
          "Hosting": {
            "LocalTempStorageLocation": "EnvironmentTemp",
            "Debug": false
          },
          "Examine": {
            "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory"
          },
          "RuntimeMinification": {
            "UseInMemoryCache": true,
            "CacheBuster": "Version"
          }
        }
      },
      "ConnectionStrings": {
        //"umbracoDbDSN": ""--ENVIRONMENT VARIABLE--"",
        "umbracoDbDSN_ProviderName": "Microsoft.Data.SqlClient"
      }
    }
    
  • drummerboy46 26 posts 88 karma points
    Aug 28, 2023 @ 21:53
    drummerboy46
    0

    I'm suffering the same fate! Did you work out what the problem was?

Please Sign in or register to post replies

Write your reply to:

Draft