I have an environmental issue with Measurement Protocol. I coded a server-side call to Google Analytics, sending an event using this as a guide: https://gist.github.com/0liver/11229128
This works in 3 environments, but in the 4th, I get this error:
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 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, 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)
I thought maybe it was a WAF issue, but it is not in blocking mode. I've also tried explicitly setting the TLS version. Nothing works. I've run out of ideas. Anyone got any?