[Mono-dev] Can anyone explain this to me? It's the Bermuda triangle.
Rolf Bjarne Kvinge
rolf at xamarin.com
Wed Apr 23 09:53:30 UTC 2014
I'm not aware of any other thread which could be throwing the exception -
> as seen in code below, there is only one thread, and it's not a background
> thread, so even if some other thread *does* die somehow, it shouldn't
> interfere with this one.
When a thread dies because of an unhandled exception the whole process
will be killed.
Also note that much of the networking code in Mono is multi-threaded (even
if your code isn't) - just the mention of 'Async' somewhere in the stack
trace suggests this.
> System.Console.Error flushes itself automatically. That's why I used it.
> But I guess I can call Flush() explicitly, just to be sure. (Even though
> I'm already sure.)
> I'm not sure what a "cached console" is. But yes, the reason I'm running
> the --trace on the code is because (a) something's going wrong, (b) I can't
> get Xamarin Studio to step into the code, (c) I followed the breadcrumbs
> down to this method, which is then calling its event handler, and I don't
> know what other thing is subscribed to the event handler. So I wanted
> --trace to tell me. But it doesn't seem to actually call the event
> handler... It somehow magically throws exception checking if the handler
> is null or not. Which baffles me.
> Here is the complete application code I'm testing with:
> using System;
> using System.Net;
> using System.Net.Sockets;
> using System.Net.Security;
> using System.Security.Authentication;
> using System.Diagnostics;
> using System.Security.Cryptography.X509Certificates;
> using System.Security.Cryptography;
> namespace FunWithSslCerts
> class MainClass
> public static void Main(string args)
> const string hostname = "telefolder.vgocom.net"; // works
> //const string hostname = "synctuary.clevertrove.net"; //
> causes AuthenticateAsClient to except, even though it shouldn't
> const int port = 443;
> var client = new TcpClient();
> client.Connect(hostname, port);
> var mySslStream = new SslStream(client.GetStream(),
> leaveInnerStreamOpen: false);
> targetHost: hostname,
> clientCertificates: null,
> enabledSslProtocols: SslProtocols.Tls,
> checkCertificateRevocation: false
> // If we throw exception on the line above, we failed.
> // If we get here, we were successful.
> System.Console.Error.WriteLine("NEDDEBUG Succeeded.");
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Explore Xamarin University <http://xamarin.com/university>--unlimited, live,
online, mobile training around the clock.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list