使用 IISExpress 进行 SSL 连接/连接重置 [英] SSL Connection / Connection Reset with IISExpress

查看:43
本文介绍了使用 IISExpress 进行 SSL 连接/连接重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次使用带有 IISExpress 的新 Visual Studio 2013(以前在 VS2010 上使用过 ASP.net 开发服务器).我在调试项目时遇到了问题.

I'm using the new Visual Studio 2013 with IISExpress for the first time (previously used ASP.net Development server on VS2010). I'm running into issues trying to debug my project.

这是我在 Chrome 中看到的:

This is what I see in Chrome:

无法与服务器建立安全连接.这可能是服务器的问题,或者可能需要您没有的客户端身份验证证书.错误代码:ERR_SSL_PROTOCOL_ERROR

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error code: ERR_SSL_PROTOCOL_ERROR

我更新了我的 Properies -> web 文件,以便项目 URL 现在使用 https URL.但是,在这样做之后,我现在在启动时遇到一个新错误:

I updated my Properies -> web file so that the Project Url uses a https URL now. However, after doing that, I now get a new error when launching:

与本地主机的连接中断.错误代码:ERR_CONNECTION_RESET

The connection to localhost was interrupted. Error code: ERR_CONNECTION_RESET

谢谢

推荐答案

如果您在 web.config 中使用 URLRewrite 强制 SSL 连接,它可能会重写您的本地主机地址以强制使用 https.如果启用 SSL 的调试对您来说并不重要并且您正在使用 URLRewrite,请考虑添加 <add input="{HTTP_HOST}" pattern="localhost" negate="true"/>进入您的 web.config 文件的重写部分.它将停止对任何本地主机地址的重写,但将其保留在生产环境中.如果您不使用 URLRewrite 或需要使用 SSL 进行调试,请http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx 可能会有所帮助.它适用于 VS2010,但也适用于 VS2013.

If you're using URLRewrite to force SSL connections in your web.config, it's probably rewriting your localhost address to force https. If debugging with SSL enabled isn't important to you and you're using URLRewrite, consider adding <add input="{HTTP_HOST}" pattern="localhost" negate="true" /> into your web.config file's rewrite section. It will stop the rewrite for any localhost addresses but leave it in place in a production environment. If you're not using URLRewrite or need to debug using SSL, http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx might help. It's for VS2010, but should suffice for VS2013 as well.

这篇关于使用 IISExpress 进行 SSL 连接/连接重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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