.NET 的智能卡身份验证
我有一个智能卡读卡器和一张智能卡。我已经安装了驱动程序并且它按预期工作。我可以使用这张卡作为 Windows 登录或远程桌面登录。
我正在构建我的应用程序,该应用程序仅在插入卡时才可以工作,并且我需要从我的应用程序调用网络服务,这需要卡的证书。
关于我该怎么做有什么建议吗?网络上充满了 ASP.NET 的示例,我正在构建 Windows 窗体。
进一步说明:即使用户在没有卡的情况下登录 Windows,一切也必须正常工作。我必须出示该卡才能使应用程序正常运行。
谢谢。
I have a smartcard reader and a smartcard. I have installed drivers and it works as expected. I can use this card as windows logon or for remote desktop logon.
I'm building my app which should work only when the card is inserted and I need to call web services from my app which requires a certificate from the card.
Any suggestions on how do I do that? The web is full of examples for ASP.NET and I'm building Windows forms.
As a further note: Everything must work the same even if user logs on windows without the card. The card must me present for the app to work.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果智能卡驱动程序支持标准 Windows CryptoAPI,它将把证书从卡导出到用户的个人存储中。您可以使用 X509Store 类。当您访问证书时,系统将提示用户插入卡并输入 PIN。
注意:某些智能卡驱动程序不会自动导出证书。相反,他们有一个用户可以用来执行此操作的工具。
If the Smartcard driver supports the standard Windows CryptoAPI, it will export the certificates from the card into the personal store of the user. You can access those certificates using the X509Store class. When you access the certificate, the user will be prompted to insert the card and enter his PIN.
Note: Some smartcard drivers do not automatically export the certificates. Instead, they have a tool which the user can use to do this.