Kru*_*sty 5 asp.net web-config certificate azure
我有一个ASP.NET MVC部署到Azure,用户通过使用客户端证书登录.在本地,如果用户未发送证书或证书无效,则网站会将用户重定向到/ error/403端点.但在Azure上这不起作用:用户没有重定向到/ error/403,显示的页面始终如下:

这是我在<system.webServer>节点内的Web.Config代码:
<httpErrors errorMode="Custom" existingResponse="Replace">
<clear />
<error statusCode="400" path="/error/400" responseMode="Redirect" />
<error statusCode="404" path="/error/404" responseMode="Redirect" />
<error statusCode="500" path="/error/500" responseMode="Redirect" />
<error statusCode="501" path="/error/501" responseMode="Redirect" />
<error statusCode="503" path="/error/503" responseMode="Redirect" />
</httpErrors>-->
Run Code Online (Sandbox Code Playgroud)
我还尝试<httpErrors existingResponse="PassThrough" />将代码添加或移动system.webServer到system.web使用customErrors节点,但似乎在读取web.config 之前用户被阻止.对于我尝试过的每一项改变,行为都是一样的.
我怎么解决?谢谢