[Mono-bugs] [Bug 67980][Cri] New - Unhandled socket exception in XSP on Windows XP

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 11 Oct 2004 10:59:24 -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 mlasky@novell.com.


--- shadow/67980	2004-10-11 10:59:23.000000000 -0400
+++ shadow/67980.tmp.14662	2004-10-11 10:59:23.000000000 -0400
@@ -0,0 +1,76 @@
+Bug#: 67980
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: Windows XP SP2 / .NET 1.1 Framework
+Status: NEW   
+Priority: Critical
+Component: Sys.Web
+AssignedTo: gonzalo@ximian.com                            
+ReportedBy: mlasky@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Unhandled socket exception in XSP on Windows XP
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I know that this bug does not necessarily belong here, but it was the
+closest related category that I could find to report it since I cannot find
+the XSP category.
+ I am running the XSP code checked out from HEAD on Windows XP. Whenever I
+hit it with a browser it takes an exception:
+Unhandled Exception: System.IO.IOException: Operation not allowed on a
+ing Socket.
+   at System.Net.Sockets.NetworkStream.InitNetworkStream(Socket socket,
+ss Access)
+   at System.Net.Sockets.NetworkStream..ctor(Socket socket, Boolean ownsSocket)
+   at Mono.ASPNET.LingeringNetworkStream..ctor(Socket sock, Boolean owns)
+in c:\
+Dev\iFolder\simias\src\SimiasApp\LingeringNetworkStream.cs:line 24
+   at Mono.ASPNET.XSPWorker..ctor(Socket client, EndPoint localEP,
+rver server) in
+c:\Dev\iFolder\simias\src\SimiasApp\XSPApplicationHost.cs:line 1
+   at Mono.ASPNET.XSPWebSource.CreateWorker(Socket client,
+ApplicationServer ser
+ver) in c:\Dev\iFolder\simias\src\SimiasApp\XSPApplicationHost.cs:line 60
+   at Mono.ASPNET.ApplicationServer.RunServer() in
+iasApp\ApplicationServer.cs:line 310
+The problem that I traced it down to is that when Socket.Accept() is
+called, the listening socket is no longer a blocking socket and therefore
+the newly created socket returned from Socket.Accept() is also
+non-blocking. When LingeringNetworkString object is constructed and
+consequently its base object NetworkStream, it throws an exception because
+only blocking type sockets are allowed.
+Steps to reproduce the problem:
+1. Check out XSP from head and build it for Windows.
+2. Run XSP on Windows XP.
+3. Hit XSP with a browser.
+Actual Results:
+An unhandle exception as reported in the description.
+Expected Results:
+No exception.
+How often does this happen? 
+Every time.
+Additional Information:
+By changing the listen_socket to blocking, the exception no longer occurs.