Umbraco 13 logs
d
Hi, I've upgraded a local site from v12 to 13. I'm now trying to upload this to the server. The site is hosted on a third-party Windows VM rather than cloud, so there are no devops pipelines, only an FTP service. The upgraded site runs locally and I've updated the publish profile to use .net8.0 as the target framework (kept all other settings the same, such as Target Runtime: Portable etc). I deleted most of the files from the destination server as I'd read that stray v12 files can cause problems, but having then uploaded the new v13 files the site is throwing a 503 error. In v12 I think the logs were in
umbraco/logs
but I notice that there has been no
umbraco
folder created in the root of the published files. So my initial question is firstly where should the log files be on a v13 site? Should the
umbraco/*
folder structure have been created by the publish task? I tried manually creating
umbraco/Logs
and
umbraco.Data
on the server but that doesn't seem to make any difference. Thanks for any help.
a
Normally its in umbraco/logs, correct
But if Umbraco cant even start due to for example Net 8 not being installed on the server, I think you should see some errors in the hosting log
d
Thanks. I'll see if I can find some useful server error logs. .NET8 is installed on the server so it shouldn't be an issue with that (unless it requires configuring in IIS or Plesk control panel or something, which I don't think was the case with the v12/.NET7 version?). So should the umbraco directory and sub-folders be manually created then? I don't remember having to do that when publishing the v12 version of the site. It feels like either the publish configuration isn't right, there's some sort of bug or I've missed something in the documentation whereby some things need to be done manually after publishing.
p
Hi, could it be that .NET 8 Hosting bundle is not installed on the server? We have had similar errors when deploying to our local servers before installing correct hosting bundle.
d
Thanks. I'll try to see if the hosting bundle is installed. One error that's cropping up in the logs on the server is:
Copy code
Application: w3wp.exe
CoreCLR Version: 8.0.123.58001
.NET Version: 8.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException: C:\Users\me\Documents\Websites\myproject\MyProject\MyProject.Web\wwwroot\
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__1_0(String contentRoot)
   at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory)
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest)
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeAppConfiguration()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Umbraco.Cms.Web.Common.Hosting.UmbracoHostBuilderDecorator.Build()
   at MyProject.Web.Program.Main(String[] args) in C:\Users\me\Documents\Websites\myproject\MyProject\MyProject.Web\Program.cs:line 6
I've no idea what is trying to access the local dev filesystem or why that's happening now. Any ideas?
Is there a different hosting bundle for .NET8 vs. .NET7? Everything on this server was installed and working with .NET7 and .NET8 has been installed but a separate hosting bundle hasn't been installed AFAIK (and I'm not sure how to check).
p
Yes it’s different hosting bundles for each framework version as far as I know at least 🙂
k
This looks like the app wasn't properly deployed, not a hosting bundle problem. The default builder ends up using the physical file provider via the static web assets loader but it doesn't find the
wwwroot
folder. Are you sure you're ftping up a
dotnet published
version of the app? And that the IIS is pointing to the correct folder?
d
Thanks. I've wiped everything in the site folder on the server and have uploaded a freshly published version of the files. This now yields the error (in the browser):
Copy code
HTTP Error 500.31 - Failed to load ASP.NET Core runtime
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
…with the following error in the event logs:
Copy code
Unable to locate application dependencies. Ensure that the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App targeted by the application are installed.
The host assures me .NET 8 and the .NET 8 Hosting Bundle have been installed.
The server has been rebooted just in case it's an issue with the installed framework not taking effect, but I'm still getting the same errors in the Event Viewer. There are 3 errors consistently showing up: 1:
Copy code
Unable to locate application dependencies. Ensure that the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App targeted by the application are installed.
2:
Copy code
Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Inetpub\vhosts\myproject.com\httpdocs\'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because 'C:\Inetpub\vhosts\myproject.com\httpdocs\MyProject.Web.runtimeconfig.json' did not specify a framework.
  - If this should be a framework-dependent app, specify the appropriate framework in 'C:\Inetpub\vhosts\myproject.com\httpdocs\MyProject.Web.runtimeconfig.json'.
3:
Copy code
Failed to start application '/LM/W3SVC/44/ROOT', ErrorCode '0x8000ffff'.
The publication settings are set to Target Framework: net8.0 and Target Runtime: Portable and Deployment Mode: Framework-dependent. These are the same settings as used previously to create the v12/.NET7 publish bundle, which worked fine. I have tried changing the Deployment Mode to Self-contained and the Target Runtime to Win-86 but that results in other errors, the solutions for which I've seen have been to use the Portable runtime.
The contents of the MyProject.Web.runtimeconfig.json file are:
Copy code
{
  "runtimeOptions": {
    "tfm": "net8.0",
    "includedFrameworks": [
      {
        "name": "Microsoft.NETCore.App",
        "version": "8.0.0"
      },
      {
        "name": "Microsoft.AspNetCore.App",
        "version": "8.0.0"
      }
    ],
    "configProperties": {
      "System.Globalization.AppLocalIcu": "72.1.0.3",
      "System.GC.Server": true,
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Reflection.NullabilityInfoContext.IsSupported": true,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}
Does anyone have any ideas?
Got it! Ended up changing the Deployment Mode to Self-contained and the Target Runtime to win-x64. Also unassigned/reassigned the application pool (as suggested in some SO threads) and that now seems to have resolved things. I don't know why this change was required when that's not how the pre-upgrade version worked, but hey ho.
u
add global.json to project, then publish again. dotnet new globaljson --sdk-version 8.0.0
342 Views