微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

测量协议 - System.Net.WebException:底层连接已关闭:接收时发生意外错误

如何解决测量协议 - System.Net.WebException:底层连接已关闭:接收时发生意外错误

我有测量协议的环境问题。我编写了一个Google Analytics 的服务器端调用,并以此为指导发送了一个事件: https://gist.github.com/0liver/11229128

这适用于 3 个环境,但在第 4 个环境中,我收到此错误

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.sockets.socketException: An existing connection was forcibly closed by the remote host at System.Net.sockets.NetworkStream.Read(Byte[] buffer,Int32 offset,Int32 size) --- End of inner exception stack trace --- at System.Net.sockets.NetworkStream.Read(Byte[] buffer,Int32 size) at System.Net.PooledStream.Read(Byte[] buffer,Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request,Boolean userRetrievedStream,Boolean probeRead) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at ASP.abc_media_test_tlstest_aspx.GATrackEvent2(String type,String category,String action,String label,String cid,Nullable`1 value) at ASP.abc_media_test_tlstest_aspx.btnSubmit_Click(Object sender,EventArgs e)

我想可能是 WAF 问题,但它并未处于阻塞模式。我也尝试过明确设置 TLS 版本。什么都行不通。我已经没有想法了。有人有吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。