Copied to clipboard

Flag this post as spam?

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


  • seanrock 241 posts 462 karma points
    1 week ago
    seanrock
    0

    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 2141 posts 14344 karma points MVP 8x c-trib
    1 week ago
    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 241 posts 462 karma points
    1 week ago
    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