[Mono-bugs] [Bug 61218][Wis] New - HttpWebResponse timeouts randomly when dealing with https uris

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 6 Jul 2004 18:15:18 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguelanxo@telefonica.net.

http://bugzilla.ximian.com/show_bug.cgi?id=61218

--- shadow/61218	2004-07-06 18:15:18.000000000 -0400
+++ shadow/61218.tmp.19123	2004-07-06 18:15:18.000000000 -0400
@@ -0,0 +1,86 @@
+Bug#: 61218
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguelanxo@telefonica.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: HttpWebResponse timeouts randomly when dealing with https uris
+
+Description of Problem:
+
+HttpWebResponse timeouts randomly when dealing with https uris
+
+Sample trigger code:
+
+https.cs
+--------
+
+using System;
+using System.IO;
+using System.Net;
+using System.Security.Cryptography.X509Certificates;
+
+public class https
+{
+	static public CookieContainer cookies = new CookieContainer ();
+
+	public class TestCertificatePolicy : ICertificatePolicy
+	{
+		public bool CheckValidationResult (
+			ServicePoint sp,
+			X509Certificate certificate,
+			WebRequest request,
+			int error)
+		{
+			return true;
+		}
+	}
+
+	public static void Main ()
+	{
+		ServicePointManager.CertificatePolicy =
+			new TestCertificatePolicy ();
+
+		HttpWebRequest myRequest =
+			(HttpWebRequest) WebRequest.Create (
+				"https://www.hotmail.com");
+
+		Console.WriteLine ("Waiting for response...");
+		HttpWebResponse myResponse =
+			(HttpWebResponse) myRequest.GetResponse ();
+	}
+}
+
+Actual Results:
+
+Randomly one of these two:
+
+- Program ends just a bit after getting a response
+- Program "hangs" setting a timeout exception
+
+Expected Results:
+
+- Program ends just after WebResponse completion
+
+How often does this happen? 
+
+- Randomly
+
+
+Additional Information:
+
+Well I'm actuallya totally newcomer to C# and mono, but looks like this is
+the simplest https transaction I managed to make.
+
+Program worked as expected when compiled with mono mcs but run under
+Microsoft .NET framework 1.1 for Windows.