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?
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
Hi seanrock
Double underscores for each level of config... And 0 for the first item in the array... So I think something like this:
Might be what you'd need in your environment settings to override the value in appsettings.json
Regards
Marc
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
is working on a reply...