赶上SSL证书请求错误,以重定向到正确的网站 [英] Catch SSL cert request error so as to redirect to the correct site

查看:297
本文介绍了赶上SSL证书请求错误,以重定向到正确的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用的是IIS 6和ASP.Net,当用户使用作出安全的页面请求

We are using IIS 6 and ASP.Net, When users make secure page requests using

https://somesite.com/securePage.aspx

用户得到一个错误:


the user gets an error:


错误code:SSL错误坏证书域


颁发证书为 www.somesite.com 并表明 somesite.com 使用无效的安全证书。

The certificate was issued to www.somesite.com and indicates that somesite.com uses an invalid security certificate.

我希望能够赶上在应用程序BeginRequest事件的要求,但在此之前发生的SSL错误。为了调用该应用BeginRequest事件,用户需要通过证书错误消息点击。是否有可能在code重定向或不给IIS中出现此修复程序需要?

I was hoping to be able to catch the request in the Application BeginRequest event but the SSL error occurs before this. In order to invoke the Application BeginRequest event the user needs to click through the certificate error message. Is it possible to redirect in code or does this fix need to occur within IIS?

推荐答案

唯一的解决方案是包括带有主题证书中的第二个领域。一些认证机构将允许你这样做无需支付额外费用。

The only solution is to include the second domain in the certificate with a SubjectAlternativeName. Some certificate authorities will allow you to do this without extra cost.

其他的一切只会发生的之后的SSL连接的建立和为此的之后的被用户所遇到的错误。

Everything else would only happen after the ssl connection is established and therefor after the error is encountered by the user.

使用HTTPS之前的任何HTTP头被发送到服务器的SSL连接协商,包括主持人:-header告诉为其虚拟主机的要求实际上是预期的服务器

With HTTPS the ssl connection is negotiated before any of the HTTP headers are sent to the server, including the Host:-header that tells the server for which virtual host the request is actually intended.

这篇关于赶上SSL证书请求错误,以重定向到正确的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆