获取页面注册的客户端证书

发布于 2024-08-22 11:48:43 字数 192 浏览 4 评论 0原文

我想为客户制作一个注册页面,该页面仅包含一个注册和取消注册按钮。当用户单击这两个按钮中的任何一个时,系统将提示他从计算机中选择客户端证书。我还想从所选证书中提取电子邮件地址。

有没有办法以声明方式将 IIS 7 配置为仅需要网站上 1 个 .aspx 页面的客户端证书。然后我可以从 Request.ClientCertificate 中提取证书,对吗?

I want to make a registration page for clients, that would only contain a button register and unregister. When the user would click on any of these 2 button he would should be prompted to select a client certificate from his computer. I would also like to extract the email address from the selected certificate.

Is there any way of declaratively configuring IIS 7 to require a client certificate for just 1 .aspx page on the website. I could then extract the certificate from Request.ClientCertificate, right?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蘑菇王子 2024-08-29 11:48:43

仅在 HTTPS 情况下,浏览器才会发送客户端证书。因此,您首先需要在 Web 服务器上安装服务器证书才能使 HTTPS 正常工作。

然后,我不认为您可以在单个页面上强制使用 SSL 和客户端证书,但您可以创建站点的子目录,在其中启用 SSL 并需要客户端证书。然后,您仅将特殊注册页面放入此子目录中,并通过注册按钮链接到该页面。

站点的其余部分可以采用匿名 HTTP。

A client certificate is sent by the browser in the HTTPS case only. So you first need to install a server certificate on your Web server in order to have HTTPS working.

Then, I don't think that you can force the use of SSL and the client certificate on a single page, but you can create a subdirectory of your site, where you enable SSL and require a client certificate. Then you put only your special registration page in this subdirectory and link to it from your register button.

The rest of your site can be in anonymous HTTP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文