read client certificate from httprequest C#

后端 未结 4 1164
陌清茗
陌清茗 2021-02-03 11:26

I am trying to read an X509 certificate using Request.ClientCertificate but nothing is returned. The certificate is definitely being attached to the request because I can get th

4条回答
  •  被撕碎了的回忆
    2021-02-03 11:50

    I'm not sure what you need the client certificate for, but if you're using it for your own custom authentication or authorization, you may want to consider using the web server's security infrastructure instead of implementing your own. For example, you can configure IIS to require client certificates, map the certs to user accounts, and use Windows-based authentication. Of course, this doesn't necessarily work for your problem domain.

提交回复
热议问题