Copied to clipboard

Flag this post as spam?

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


  • seanrock 262 posts 483 karma points
    Apr 18, 2024 @ 15:00
    seanrock
    0

    Custom 404 in azure

    Hi

    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?

    Thanks

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Apr 18, 2024 @ 21:21
    Marc Goodson
    0

    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

    Regards

    Marc

  • seanrock 262 posts 483 karma points
    Apr 19, 2024 @ 08:06
    seanrock
    0

    Hi

    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:

Draft