c# - ASP.NET Core 3.1 Certificate Authentication in IIS
问题描述
I am trying to use certificate authentication with ASP.NET Core 3.1. I will be hosting WebAPI in IIS using inprocess model. I looked at the sample code from official docs and tried doing the POC.
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-3.1
But I am not able to test it out. I have tried it with default certificate as well as custom certificate. I have added the certificate to Personal store. Run netsh commands to add ssl binding using this certificate thumbprint. When I launch the app in debug mode, I can see the site being protected by the appropriate certificate.
However, if I add [Authorize] to individual controller action method or at Controller level, I get 403 error. But I dont see the validate certificate method being triggered. So unable to identify what is the root cause. Please let me know if anyone has a working sample that I could refer to.
Thanks!
解决方案
推荐阅读
- ansible - 将 url 模块与 jinja2 模板一起使用
- c - 如何从子进程向父进程发送暂停和继续信号?
- excel - 在当前目录中打开工作簿
- telegram-bot - 电报机器人方法 SendContact 没有添加按钮
- laravel - 可以在 CLI 工具中启动 ChromeDriver,但不允许连接
- c++ - 从另一个菜单返回菜单?
- javascript - 单击时创建链接并在 Iframe 中打开该链接?
- javascript - 如何在 Javascript 中显示 base64 图像
- obiee - 未来 6 个月 OBIEE 中的数据
- java - Spring Security SSO 仅在隐身模式下工作