Here’s the code I’m running:
var wc = new WebClient ();
var test1 = wc.DownloadString("http://www.google.com");
var test2 = wc.DownloadString("https://www.google.com");
test1 gives me some text.
test2 never gets initialised because of an exception with trace starting:
{System.Net.WebException: Error getting response stream (Write:
EndWrite failure): SendFailure —> System.IO.IOException: EndWrite
failure —> System.Net.Sockets.SocketException: The socket has been
shut down at System.Net.Sockets.Socket.EndSend (IAsyncResult result)
[0x0002d] in
/home/jon/Development/xamarin/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1989
at System.Net.Sockets.NetworkStream.EndWrite (IAsyncResult ar)
[0x0002f] in
/home/jon/Development/xamarin/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:358
— End of inner exception stack trace — at System.Net.Sockets.NetworkStream.EndWrite (IAsyncResult ar) [0x0003d]
in
/home/jon/Development/xamarin/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:360
at Mono.Security.Protocol.Tls.RecordProtocol.EndSendRecord
(IAsyncResult asyncResult) [0x00040] in
/home/jon/Development/xamarin/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:721
at Mono.Security.Protocol.Tls.RecordProtocol.SendRecord (ContentType
contentType, System.Byte[] recordData) [0x0000b] in
/home/jon/Development/xamarin/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:729
I’m running MonoDevelop.MonoDroid – 2.6.0.0 – with a download from MonoDroid a couple of days ago – “Mono for Android: 1.2.24817.105690530 (Evaluation)”
Is this just a bug – or is there some other step I need for MonoDroid?
It seems this has been confirmed as a bug in the 1.2 release – so I’m closing this question!