Windows 8 Embedded上的自签名本地主机上的Chrome(v71)ERR_CONNECTION_RESET [英] Chrome (v71) ERR_CONNECTION_RESET on Self Signed localhost on Windows 8 Embedded
问题描述
我在本地计算机上运行WCF服务公开API( https://localhost:8080/MyApi ),在本地计算机上注册的自签名SHA-256证书,执行"netsh http add sslcert ipport=0.0.0.0:8080 certhash=... appid=...
",并且在浏览到 https://localhost:8080时执行/MyApi (来自Chrome)显示ERR_CONNECTION_RESET.
I run WCF service exposes API on local machine (https://localhost:8080/MyApi), self signed SHA-256 certificate registered on local machine, executed "netsh http add sslcert ipport=0.0.0.0:8080 certhash=... appid=...
" and when browsing to https://localhost:8080/MyApi from Chrome it shows ERR_CONNECTION_RESET.
现在有趣的部分:
- 使用Chrome v41可以正常工作.仅在升级到Chrome v69(与v71相同)后发生.
- 从IE浏览很有效.
- 从PowerShell网络调用中调用API均可.
- Windows 10上的所有内容都可以正常工作.
- 将#allow-insecure-localhost修改为ENABLED在Windows 10上有效,但在Windows 8 Embedded上无效.
激活Chrome日志记录后,发现以下内容:
After activating chrome logging found this:
{"params":{"net_error":-101,"os_error":10054},"phase":0,"source":{"id":7810,"type":8},"time":"52598608","type":68},
{"params":{"error_lib":33,"error_reason":101,"file":"../../net/socket/socket_bio_adapter.cc","line":154,"net_error":-101,"ssl_error":1},"phase":0,"source":{"id":7810,"type":8},"time":"52598608","type":54},
其他Chrome日志记录:
Additional Chrome logging:
[8652:5036:0107/174231.775:ERROR:ssl_client_socket_impl.cc(1013)] 握手失败;返回-1,SSL错误代码1,net_error -101 [8652:5036:0107/174231.793:ERROR:ssl_client_socket_impl.cc(1013)] 握手失败返回-1,SSL错误代码1,net_error -101 [8652:5036:0107/174231.795:ERROR:ssl_client_socket_impl.cc(1013)] 握手失败返回-1,SSL错误代码1,net_error -101
[8652:5036:0107/174231.775:ERROR:ssl_client_socket_impl.cc(1013)] handshake failed; returned -1, SSL error code 1, net_error -101 [8652:5036:0107/174231.793:ERROR:ssl_client_socket_impl.cc(1013)] handshake fail ed; returned -1, SSL error code 1, net_error -101 [8652:5036:0107/174231.795:ERROR:ssl_client_socket_impl.cc(1013)] handshake fail ed; returned -1, SSL error code 1, net_error -101
您是否知道如何使WCF本地服务器成功访问Chrome?
Do you have any idea how to make Chrome access successfully my WCF localhost server?
推荐答案
您如何发布wcf服务?我希望您可以发布有关您的服务的更多详细信息.我按照您的步骤进行操作,但无法重现您的问题.
这是我的演示,希望它对您有用.
服务器(控制台应用程序,IP:10.157.13.69).
How do you publish your wcf service? I would like you could post more details about your service. I followed your steps while could not reproduce your problem.
Here is my demo, wish it is useful to you.
Server (Console application,IP: 10.157.13.69).
class Program
{
static void Main(string[] args)
{
using (ServiceHost sh = new ServiceHost(typeof(MyService)))
{
sh.Opened += delegate
{
Console.WriteLine("service is ready...");
};
sh.Closed += delegate
{
Console.WriteLine("Service is closed");
};
sh.Open();
Console.ReadLine();
sh.Close();
}
}
}
[ServiceContract]
public interface IService
{
[OperationContract]
[WebGet]
string SayHello();
}
public class MyService : IService
{
public string SayHello()
{
return $"Hello, busy world\n{DateTime.Now.ToShortTimeString()}";
}
}
app.config
<system.serviceModel>
<services>
<service name="Server6.MyService" behaviorConfiguration="mybeh">
<endpoint address="" binding="webHttpBinding" contract="Server6.IService" behaviorConfiguration="rest" bindingConfiguration="mybinding" >
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"></endpoint>
<host>
<baseAddresses>
<add baseAddress="https://localhost:13060"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="mybinding">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="mybeh">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"></serviceMetadata>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="rest">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
将证书绑定到ip端口
netsh http add sslcert ipport=0.0.0.0:13060
certhash=6e48c590717cb2c61da97346d5901b260e983850 appid={AA228B95-6613-4D58-9236-2C263AFDF231}
结果.这些浏览器版本均为V71.0
本地.
远程机器.
浏览器.
Result. these browser version is all V71.0
Local.
Remote mechine.
Browser.
请随时告诉我是否有什么可以帮忙的.
Feel free to let me know if there is anything I can help with.
这篇关于Windows 8 Embedded上的自签名本地主机上的Chrome(v71)ERR_CONNECTION_RESET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!