azureumbracoumbraco14

Error while upgrade from Umbraco 14 to 15


I tried to upgrade my website from Umbraco 14 to 15.

This the error I get when try to navigate to my website after I did dotnet publish and copied bin\Release\net9.0\publish\ to ftp:

You do not have permission to view this directory or page.

In Azure I changed .NET version from 8 to 9.

Any idea?

On local I was able to upgrade quickly and with no issues. But when deployed to Azure I can't access.

I tried to look in the KUDU console in Azure but it's not even give the latest updates. It's has logs from few months ago.

When upgraded, obviously I deleted all files of U14, stopped the app, then copied the files of U15.

Please advise.

Thanks.


Solution

  • I created a sample Umbraco 14 application with .NET Core 8 and deployed it to Azure. Then, I upgraded it to Umbraco 15 with .NET Core 9 and redeployed it to Azure.

    I upgraded my app by changing the TargetFramework to net9.0 and updating Umbraco.Cms to version 15.0.0 in the .csproj file.

    Below is my complete .csproj file:

    <Project Sdk="Microsoft.NET.Sdk.Web">
      <PropertyGroup>
        <TargetFramework>net9.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="Umbraco.Cms" Version="15.0.0" />
      </ItemGroup>
      <ItemGroup>
        <PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
        <RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
      </ItemGroup>
      <PropertyGroup>  <CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
      </PropertyGroup>
      <PropertyGroup>
      <RazorCompileOnBuild>false</RazorCompileOnBuild>  <RazorCompileOnPublish>false</RazorCompileOnPublish>
      </PropertyGroup>
    </Project>
    
    

    Make sure to run the build and publish commands after upgrading to Umbraco 15.

    If you are using a local database, upgrade it to Azure SQL Database.
    Refer this MSDoc to Migrate Database to Azure SQL Database.

    Below is my Connection String In appsetting.json:

     "ConnectionStrings": {
        "umbracoDbDSN": "Server=tcp:<ServerName>.database.windows.net,1433;Database=<DataBaseName>;User ID=<UserName>@<ServerName>;Password=<Password>",
        "umbracoDbDSN_ProviderName": "Microsoft.Data.SqlClient"
      }
    
    

    Before Deploying to my App to Azure I Changed the .NET version to .NET9(STS) in Configuration Section of Azure Web App.

    enter image description here

    After Successful deployed to Azure Using FTP, I got the same issue. When I checked the Kudu console, I found that my deployed files were stored in the wwwroot/publish folder.

    enter image description here

    I’ve changed the path mapping from site/wwwroot to site/wwwroot/publish in Configuration section of Azure Web App as shown below.

    enter image description here

    Azure Output:

    enter image description here