Copied to clipboard

Flag this post as spam?

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

  • seanrock 242 posts 463 karma points
    Apr 18, 2024 @ 15:00


    I'm trying to implement a custom 404 in azure but its not working. The issue is the contentkey (or contentid) is defined in azure configuration rather than in the appsettings.config. This is because the node id (or key) will be different in the testing environments.

    We define other settings this way without issue.

    I think the problem is the Error404Collection is an array. I've tried various suggestions such as copying the json into the setting value, but that didn't work. I've tried both the contentId and contentKey, neither worked.

    Anyone had success with adding the 404 details to azure configuration rather than appSettings.json?


  • Marc Goodson 2149 posts 14354 karma points MVP 8x c-trib
    Apr 18, 2024 @ 21:21
    Marc Goodson

    Hi seanrock

    Double underscores for each level of config... And 0 for the first item in the array... So I think something like this:

    Umbraco__CMS__Content__Error404Collection__0__ContentXPath : /pageNotFound

    Might be what you'd need in your environment settings to override the value in appsettings.json



  • seanrock 242 posts 463 karma points
    Apr 19, 2024 @ 08:06


    No, this didn't work. I've read that the double underscores are for non-windows apps. We use colons for other settings which works fine,

    e.g. works: Umbraco:Storage:AzureBlob:Media:ConnectionString

Please Sign in or register to post replies

Write your reply to: