I have this config which works and redirects the following errors correctly
This is becuase IIS by default (Ive just discovered this with IIS 10) at a server level locks defaultPath.
The error is saying some parent web.config attribute has been locked so you're not allowed to overwrite it.
The way to change this is to
'Configuration Editor' icon in the last row.'system.webServer/httpErrors' into the section dropdown at the top
defaultPath'defaultPath' attribute > sub menuUnlock attributeApply Changes in the top rightI'd generally recommend against this though, as you'll have to do this on every server you deploy the site to. (and I'm also not sure how something like Azure Web apps that dont give you this level of access handle it)