测量协议 - 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 (将#修改为@)