I work on a C#/.NET application that has functionality to integrate with external web services. For the communications, we utilize a class that we built that inherits from the .NET System.Net.WebClient class.
While attempting to retrieve the WSDL from the Bloomberg site for testing, we seem to be getting a dropped connection with no other indications as to why. It appears as though it gets a successful HTTPS connection, but the remote site simply disconnects when an attempt is made to read the response. We are simply calling the System.Net.WebClient.DownloadString()
method and passing in the WSDL URL: https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL.
webClient = new HttpWebClient();
UriBuilder uriBuilder = new UriBuilder(this.ServiceUrl);
uriBuilder.Query = "WSDL";
webClient.Headers.Add("Content-Type", "text/xml; charset=utf-8");
this.RawWsdlData = webClient.DownloadString(uriBuilder.Uri);
We have been able to verify that the URL is correct by putting in the same URL into a browser, which results in us obtaining the requested WSDL.
I have turned on System.Net
tracing and have been able to obtain an internal trace. Note that HttpWebClient
is our class that is inherited from System.Net.WebClient
.
Log started for PID = 6564, TID = 26
Getting WSDL from service (https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL)
System.Net Verbose: 0 : [2072] Entering HttpWebClient#21999770::DownloadString(https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL#-917497223)
System.Net Verbose: 0 : [2072] Entering HttpWebClient#21999770::DownloadData(https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL#-917497223)
System.Net Verbose: 0 : [2072] Entering WebRequest::Create(https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL)
System.Net Verbose: 0 : [2072] Entering HttpWebRequest#49164730::HttpWebRequest(https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL#-917497223)
System.Net Information: 0 : [2072] Current OS installation type is 'Client'.
System.Net Information: 0 : [2072] RAS supported: True
System.Net Verbose: 0 : [2072] Exiting HttpWebRequest#49164730::HttpWebRequest()
System.Net Verbose: 0 : [2072] Exiting WebRequest::Create() -> HttpWebRequest#49164730
System.Net Verbose: 0 : [2072] Entering HttpWebRequest#49164730::GetResponse()
System.Net Error: 0 : [2072] Can't retrieve proxy settings for Uri 'https://service.bloomberg.com/assets/dl/dlws.wsdl?WSDL'. Error code: 12180.
System.Net Verbose: 0 : [2072] Entering ServicePoint#10615457::ServicePoint(service.bloomberg.com:443)
System.Net Information: 0 : [2072] Associating HttpWebRequest#49164730 with ServicePoint#10615457
System.Net Information: 0 : [2072] Associating Connection#16234150 with HttpWebRequest#49164730
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#24691947::Socket(AddressFamily#2)
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#24691947::Socket()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#7067698::Socket(AddressFamily#23)
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#7067698::Socket()
System.Net.Sockets Verbose: 0 : [2072] Entering DNS::TryInternalResolve(service.bloomberg.com)
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#24691947::Connect(69.191.242.179:443#-1275937026)
System.Net.Sockets Information: 0 : [2072] Socket#24691947 - Created connection from 10.2.7.102:52684 to 69.191.242.179:443.
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#24691947::Connect()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#7067698::Close()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#7067698::Dispose()
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#7067698::Close()
System.Net Information: 0 : [2072] Connection#16234150 - Created connection from 10.2.7.102:52684 to 69.191.242.179:443.
System.Net Information: 0 : [2072] TlsStream#32181663::.ctor(host=service.bloomberg.com, #certs=0, checkCertificateRevocationList=False, sslProtocols=Default)
System.Net Information: 0 : [2072] Associating HttpWebRequest#49164730 with ConnectStream#18140357
System.Net Information: 0 : [2072] HttpWebRequest#49164730 - Request: GET /assets/dl/dlws.wsdl?WSDL HTTP/1.1
System.Net Information: 0 : [2072] ConnectStream#18140357 - Sending headers
{
Content-Type: text/xml; charset=utf-8
Host: service.bloomberg.com
Connection: Keep-Alive
}.
System.Net Information: 0 : [2072] SecureChannel#31141938::.ctor(hostname=service.bloomberg.com, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [2072] Enumerating security packages:
System.Net Information: 0 : [2072] Negotiate
System.Net Information: 0 : [2072] NegoExtender
System.Net Information: 0 : [2072] Kerberos
System.Net Information: 0 : [2072] NTLM
System.Net Information: 0 : [2072] TSSSP
System.Net Information: 0 : [2072] pku2u
System.Net Information: 0 : [2072] WDigest
System.Net Information: 0 : [2072] Schannel
System.Net Information: 0 : [2072] Microsoft Unified Security Protocol Provider
System.Net Information: 0 : [2072] Default TLS SSP
System.Net Information: 0 : [2072] CREDSSP
System.Net Information: 0 : [2072] SecureChannel#31141938 - Left with 0 client certificates to choose from.
System.Net Information: 0 : [2072] SecureChannel#31141938::.AcquireClientCredentials, new SecureCredential() (flags=(ValidateManual, NoDefaultCred, SendAuxRecord), m_ProtocolFlags=(Ssl3Client, Tls10Client), m_EncryptionPolicy=RequireEncryption)
System.Net Information: 0 : [2072] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential)
System.Net Information: 0 : [2072] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = service.bloomberg.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [2072] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=125, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#24691947::Send()
System.Net.Sockets Verbose: 0 : [2072] Data from Socket#24691947::Send
System.Net.Sockets Verbose: 0 : [2072] 00000000 : 16 03 01 00 78 01 00 00-74 03 01 5C C2 03 9A 43 : ....x...t..\...C
System.Net.Sockets Verbose: 0 : [2072] 00000010 : 54 67 9D 98 2C 4E 6B B9-A4 4C D5 8D 08 BC 03 36 : Tg..,Nk..L.....6
System.Net.Sockets Verbose: 0 : [2072] 00000020 : 03 5F E6 D2 DA 82 2E AC-C4 C8 15 00 00 0E C0 0A : ._..............
System.Net.Sockets Verbose: 0 : [2072] 00000030 : C0 09 C0 14 C0 13 00 35-00 2F 00 0A 01 00 00 3D : .......5./.....=
System.Net.Sockets Verbose: 0 : [2072] 00000040 : 00 00 00 1A 00 18 00 00-15 73 65 72 76 69 63 65 : .........service
System.Net.Sockets Verbose: 0 : [2072] 00000050 : 2E 62 6C 6F 6F 6D 62 65-72 67 2E 63 6F 6D 00 0A : .bloomberg.com..
System.Net.Sockets Verbose: 0 : [2072] 00000060 : 00 08 00 06 00 1D 00 17-00 18 00 0B 00 02 01 00 : ................
System.Net.Sockets Verbose: 0 : [2072] 00000070 : 00 23 00 00 00 17 00 00-FF 01 00 01 00 : .#...........
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#24691947::Send() -> Int32#125
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#24691947::Receive()
System.Net.Sockets Error: 0 : [2072] Socket#24691947::UpdateStatusAfterSocketError() - ConnectionReset
System.Net.Sockets Error: 0 : [2072] Exception in Socket#24691947::Receive - An existing connection was forcibly closed by the remote host.
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#24691947::Receive() -> Int32#0
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#24691947::Dispose()
System.Net Error: 0 : [2072] Exception in HttpWebRequest#49164730:: - The underlying connection was closed: An unexpected error occurred on a send..
System.Net Information: 0 : [2072] Associating HttpWebRequest#49164730 with ServicePoint#10615457
System.Net Information: 0 : [2072] Associating Connection#39028125 with HttpWebRequest#49164730
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#26207244::Socket(AddressFamily#2)
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#26207244::Socket()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#38017319::Socket(AddressFamily#23)
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#38017319::Socket()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#26207244::Connect(69.191.242.179:443#-1275937026)
System.Net.Sockets Information: 0 : [2072] Socket#26207244 - Created connection from 10.2.7.102:52685 to 69.191.242.179:443.
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#26207244::Connect()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#38017319::Close()
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#38017319::Dispose()
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#38017319::Close()
System.Net Information: 0 : [2072] Connection#39028125 - Created connection from 10.2.7.102:52685 to 69.191.242.179:443.
System.Net Information: 0 : [2072] TlsStream#50247169::.ctor(host=service.bloomberg.com, #certs=0, checkCertificateRevocationList=False, sslProtocols=Default)
System.Net Information: 0 : [2072] Associating HttpWebRequest#49164730 with ConnectStream#41123459
System.Net Information: 0 : [2072] HttpWebRequest#49164730 - Request: GET /assets/dl/dlws.wsdl?WSDL HTTP/1.1
System.Net Information: 0 : [2072] ConnectStream#41123459 - Sending headers
{
Content-Type: text/xml; charset=utf-8
Host: service.bloomberg.com
Connection: Keep-Alive
}.
System.Net Information: 0 : [2072] SecureChannel#53272024::.ctor(hostname=service.bloomberg.com, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [2072] SecureChannel#53272024 - Left with 0 client certificates to choose from.
System.Net Information: 0 : [2072] Using the cached credential handle.
System.Net Information: 0 : [2072] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = service.bloomberg.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [2072] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=125, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#26207244::Send()
System.Net.Sockets Verbose: 0 : [2072] Data from Socket#26207244::Send
System.Net.Sockets Verbose: 0 : [2072] 00000000 : 16 03 01 00 78 01 00 00-74 03 01 5C C2 03 9A D8 : ....x...t..\....
System.Net.Sockets Verbose: 0 : [2072] 00000010 : 38 E3 3A 39 65 29 89 69-19 11 28 40 22 A3 87 9F : 8.:9e).i..(@"...
System.Net.Sockets Verbose: 0 : [2072] 00000020 : 0C 7A 2D C6 9F 0A 67 D9-F1 78 CA 00 00 0E C0 0A : .z-...g..x......
System.Net.Sockets Verbose: 0 : [2072] 00000030 : C0 09 C0 14 C0 13 00 35-00 2F 00 0A 01 00 00 3D : .......5./.....=
System.Net.Sockets Verbose: 0 : [2072] 00000040 : 00 00 00 1A 00 18 00 00-15 73 65 72 76 69 63 65 : .........service
System.Net.Sockets Verbose: 0 : [2072] 00000050 : 2E 62 6C 6F 6F 6D 62 65-72 67 2E 63 6F 6D 00 0A : .bloomberg.com..
System.Net.Sockets Verbose: 0 : [2072] 00000060 : 00 08 00 06 00 1D 00 17-00 18 00 0B 00 02 01 00 : ................
System.Net.Sockets Verbose: 0 : [2072] 00000070 : 00 23 00 00 00 17 00 00-FF 01 00 01 00 : .#...........
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#26207244::Send() -> Int32#125
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#26207244::Receive()
System.Net.Sockets Error: 0 : [2072] Socket#26207244::UpdateStatusAfterSocketError() - ConnectionReset
System.Net.Sockets Error: 0 : [2072] Exception in Socket#26207244::Receive - An existing connection was forcibly closed by the remote host.
System.Net.Sockets Verbose: 0 : [2072] Exiting Socket#26207244::Receive() -> Int32#0
System.Net.Sockets Verbose: 0 : [2072] Entering Socket#26207244::Dispose()
System.Net Error: 0 : [2072] Exception in HttpWebRequest#49164730:: - The underlying connection was closed: An unexpected error occurred on a send..
System.Net Error: 0 : [2072] Exception in HttpWebRequest#49164730::GetResponse - The underlying connection was closed: An unexpected error occurred on a send..
System.Net Verbose: 0 : [2072] Entering HttpWebRequest#49164730::Abort()
System.Net Error: 0 : [2072] Exception in HttpWebRequest#49164730:: - The request was aborted: The request was canceled..
System.Net Verbose: 0 : [2072] Exiting HttpWebRequest#49164730::Abort()
Being an HTTPS connection, I would have expected an SSL/TLS type error, but this just shows a remote disconnect and nothing else.
Anyone have any ideas on what the cause could be or what can be done to debug this further? I can reproduce this at will, so it is not a random issue.