![]() |
"The operation has timed-out." exception on WinXP
Our web clients makes synchronous web method calls to a
web service on a XP workstation, running .Net 1.1.4322. When there are already 10 connections to the IIS, the client gets "The request failed with HTTP status 403: Access Forbidden." when calling the web service. This is expected behavior documented by MSDN. However, my problem is if the client (same thread) tries to make the call again after the total connection < 10, it will get "The operation has timed-out." exception first, and then if the client makes the same call again, it will work. If the IIS connection stays at 10, the client will get those two exceptions one after another. I am expecting the client to always get the "..Access Forbidden" exception. It seems that after the "...403: Access Forbidden" error, the client will always get a "The operation has timed- out." before it will work again. I set the client side timeout to 30 seconds. The timeout exception happens about 90 seconds after making the call. I am trying to figure out how to avoid the timeout exception. Any suggestions? The exception call stack is below: Error: System.Net.WebException: The operation has timed- out. at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke (String methodN ame, Object[] parameters) at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g methodName, Object[] p arameters) in d:\easyit\code\src\easyit_sdk\easysoaphttpclientpr otocol.cs :line 3 |
Re: "The operation has timed-out." exception on WinXP
Hi Yanhong,
Thank you for the reply. I did not explicitly open any handle so I am not sure if I what I need to close. In my web proxy class, I created a new Invoke method to replace the base class's Invoke method. In my Invoke method, I call the base class's Invoke, and added retry if base class's Invoke throws exception. So when IIS stays busy with 10 connections, my Invoke will automatically retry - sleep - retry - sleep ... for up to MaxRetry. // Replace the base class's Invoke. protected new object[] Invoke(string methodName, object[] parameters) { object[] results = null; int nRetries = 0; do { try { results = base.Invoke(methodName, parameters); // if we do not have an exception, we will exit the while loop now. break; } catch(System.Net.WebException webExp) { // On WinXP, this could be "The request failed with HTTP status 403: Access Forbidden" // This also could be ""The operation has timed-out." // we need to retry in both cases if (nRetries==MaxRetry) { throw webExp; } else { // sleep sometime before retrying System.Threading.Thread.Sleep(RetryInterval); } } nRetries++; }while(this.EnableRetry==true); return results; } Thanks Joel Zhou "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... > Hello Joel, > > I can't tell exactly where the problem exists now. Have you confirmed that you have closed all the handles, such as stream > handles, and etc. > > Thanks. > > Best regards, > Yanhong Huang > Microsoft Online Partner Support > > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. > > -------------------- > !Content-Class: urn:content-classes:message > !From: "Joel Zhou" <joel.zhou@emersonprocess.com> > !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> > !Subject: "The operation has timed-out." exception on WinXP > !Date: Wed, 16 Jul 2003 16:03:59 -0700 > !Lines: 39 > !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> > !MIME-Version: 1.0 > !Content-Type: text/plain; > ! charset="iso-8859-1" > !Content-Transfer-Encoding: 7bit > !X-Newsreader: Microsoft CDO for Windows 2000 > !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== > !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !Path: cpmsftngxa06.phx.gbl > !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18319 > !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 > !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > ! > !Our web clients makes synchronous web method calls to a > !web service on a XP workstation, running .Net 1.1.4322. > ! > !When there are already 10 connections to the IIS, the > !client gets "The request failed with HTTP status 403: > !Access Forbidden." when calling the web service. This is > !expected behavior documented by MSDN. However, my problem > !is if the client (same thread) tries to make the call > !again after the total connection < 10, it will get "The > !operation has timed-out." exception first, and then if the > !client makes the same call again, it will work. > ! > !If the IIS connection stays at 10, the client will get > !those two exceptions one after another. I am expecting the > !client to always get the "..Access Forbidden" exception. > ! > !It seems that after the "...403: Access Forbidden" error, > !the client will always get a "The operation has timed- > !out." before it will work again. I set the client side > !timeout to 30 seconds. The timeout exception happens about > !90 seconds after making the call. > ! > !I am trying to figure out how to avoid the timeout > !exception. Any suggestions? > ! > !The exception call stack is below: > !Error: System.Net.WebException: The operation has timed- > !out. > ! at System.Net.HttpWebRequest.GetRequestStream() > ! at > !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke > !(String methodN > !ame, Object[] parameters) > ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g > !methodName, Object[] p > !arameters) in > !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs > !:line 3 > ! > ! > > |
Re: "The operation has timed-out." exception on WinXP
Hello Joel,
I did reproduce it on my side. The next exception (timed-out) happens after each 403 error. I will dig into it and reply you with more information on it. Thanks very much. Best regards, Yanhong Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> !Subject: Re: "The operation has timed-out." exception on WinXP !Date: Wed, 23 Jul 2003 14:06:32 -0500 !Lines: 217 !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !Message-ID: <#sD2G3UUDHA.2368@TK2MSFTNGP09.phx.gbl> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18428 !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es ! !Hi Yanhong, ! !I tried to simplify the problem by creating a web service, and then added !web reference of this web service in a C# console test client. I did not put !my custom Invoke in the proxy this time. I kept the IIS busy by launching a !web client and kept the current connection at 10 (maximum allowed by WinXP). !When I launch the test client, I got the following exception one after !another: !The request failed with HTTP status 403: Access Forbidden. !The operation has timed-out. !The request failed with HTTP status 403: Access Forbidden. !The operation has timed-out. !... ! !In the test client, the code is simply calling the same method on the web !service in a while loop. ! !localhost.Service1 webProxy = new localhost.Service1(); !while (true) !{ ! try ! { ! string result = webProxy.Sleep(1000); ! Console.WriteLine("Done. Result = {0}", result); ! } ! catch(Exception e) ! { ! Console.WriteLine("Failed. Exception={0}", e.Message); ! } !} !return; ! !Thanks for your help, !Joel ! ! ! !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !news:Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl... !> Hello Joel, !> !> Then if you remove this part of code, did you meet this problem? We need !to isolate the problem before digging into it. :) !> Thanks very much. !> !> Best regards, !> Yanhong Huang !> Microsoft Online Partner Support !> !> Get Secure! - www.microsoft.com/security !> This posting is provided "AS IS" with no warranties, and confers no !rights. !> !> -------------------- !> !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> !<WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !> !Subject: Re: "The operation has timed-out." exception on WinXP !> !Date: Fri, 18 Jul 2003 11:32:18 -0500 !> !Lines: 137 !> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !> !Message-ID: <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !> !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl !> !Xref: cpmsftngxa06.phx.gbl !microsoft.public.dotnet.framework.aspnet.webservi ces:18362 !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !> ! !> !Hi Yanhong, !> ! !> !Thank you for the reply. I did not explicitly open any handle so I am not !> !sure if I what I need to close. !> ! !> !In my web proxy class, I created a new Invoke method to replace the base !> !class's Invoke method. In my Invoke method, I call the base class's !Invoke, !> !and added retry if base class's Invoke throws exception. So when IIS !stays !> !busy with 10 connections, my Invoke will automatically retry - sleep - !> !retry - sleep ... for up to MaxRetry. !> ! !> !// Replace the base class's Invoke. !> !protected new object[] Invoke(string methodName, object[] parameters) !> ! { !> ! object[] results = null; !> ! int nRetries = 0; !> ! do !> ! { !> ! try !> ! { !> ! results = base.Invoke(methodName, parameters); !> ! // if we do not have an exception, we will exit the !> !while loop now. !> ! break; !> ! } !> ! catch(System.Net.WebException webExp) !> ! { !> ! // On WinXP, this could be "The request failed with !HTTP !> !status 403: Access Forbidden" !> ! // This also could be ""The operation has timed-out." !> ! // we need to retry in both cases !> ! if (nRetries==MaxRetry) !> ! { !> ! throw webExp; !> ! } !> ! else !> ! { !> ! // sleep sometime before retrying !> ! System.Threading.Thread.Sleep(RetryInterval); !> ! } !> ! } !> ! nRetries++; !> ! }while(this.EnableRetry==true); !> ! !> ! return results; !> ! } !> ! !> ! !> !Thanks !> !Joel Zhou !> ! !> ! !> ! !> !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !> !news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... !> !> Hello Joel, !> !> !> !> I can't tell exactly where the problem exists now. Have you confirmed !that !> !you have closed all the handles, such as stream !> !> handles, and etc. !> !> !> !> Thanks. !> !> !> !> Best regards, !> !> Yanhong Huang !> !> Microsoft Online Partner Support !> !> !> !> Get Secure! - www.microsoft.com/security !> !> This posting is provided "AS IS" with no warranties, and confers no !> !rights. !> !> !> !> -------------------- !> !> !Content-Class: urn:content-classes:message !> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !> !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !> !Subject: "The operation has timed-out." exception on WinXP !> !> !Date: Wed, 16 Jul 2003 16:03:59 -0700 !> !> !Lines: 39 !> !> !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> !> !> !MIME-Version: 1.0 !> !> !Content-Type: text/plain; !> !> ! charset="iso-8859-1" !> !> !Content-Transfer-Encoding: 7bit !> !> !X-Newsreader: Microsoft CDO for Windows 2000 !> !> !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 !> !> !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== !> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !> !> !Path: cpmsftngxa06.phx.gbl !> !> !Xref: cpmsftngxa06.phx.gbl !> !microsoft.public.dotnet.framework.aspnet.webservi ces:18319 !> !> !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 !> !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !> !> ! !> !> !Our web clients makes synchronous web method calls to a !> !> !web service on a XP workstation, running .Net 1.1.4322. !> !> ! !> !> !When there are already 10 connections to the IIS, the !> !> !client gets "The request failed with HTTP status 403: !> !> !Access Forbidden." when calling the web service. This is !> !> !expected behavior documented by MSDN. However, my problem !> !> !is if the client (same thread) tries to make the call !> !> !again after the total connection < 10, it will get "The !> !> !operation has timed-out." exception first, and then if the !> !> !client makes the same call again, it will work. !> !> ! !> !> !If the IIS connection stays at 10, the client will get !> !> !those two exceptions one after another. I am expecting the !> !> !client to always get the "..Access Forbidden" exception. !> !> ! !> !> !It seems that after the "...403: Access Forbidden" error, !> !> !the client will always get a "The operation has timed- !> !> !out." before it will work again. I set the client side !> !> !timeout to 30 seconds. The timeout exception happens about !> !> !90 seconds after making the call. !> !> ! !> !> !I am trying to figure out how to avoid the timeout !> !> !exception. Any suggestions? !> !> ! !> !> !The exception call stack is below: !> !> !Error: System.Net.WebException: The operation has timed- !> !> !out. !> !> ! at System.Net.HttpWebRequest.GetRequestStream() !> !> ! at !> !> !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke !> !> !(String methodN !> !> !ame, Object[] parameters) !> !> ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g !> !> !methodName, Object[] p !> !> !arameters) in !> !> !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs !> !> !:line 3 !> !> ! !> !> ! !> !> !> !> !> ! !> ! !> ! !> !> ! ! ! |
Re: "The operation has timed-out." exception on WinXP
Hi Joel,
We are still performing research on it. It may need some more time. Sorry for any inconvenience. Best regards, Yanhong Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- !X-Tomcat-ID: 243274584 !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> <#sD2G3UUDHA.2368 @TK2MSFTNGP09.phx.gbl> !MIME-Version: 1.0 !Content-Type: text/plain !Content-Transfer-Encoding: 7bit !From: yhhuang@online.microsoft.com (Yan-Hong Huang[MSFT]) !Organization: Microsoft !Date: Thu, 24 Jul 2003 09:54:36 GMT !Subject: Re: "The operation has timed-out." exception on WinXP !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !Message-ID: <lg9AcmcUDHA.2084@cpmsftngxa06.phx.gbl> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !Lines: 232 !Path: cpmsftngxa06.phx.gbl !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18442 !NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 ! !Hello Joel, ! !I did reproduce it on my side. The next exception (timed-out) happens after each 403 error. I will dig into it and reply you with !more information on it. ! !Thanks very much. ! !Best regards, !Yanhong Huang !Microsoft Online Partner Support ! !Get Secure! - www.microsoft.com/security !This posting is provided "AS IS" with no warranties, and confers no rights. ! !-------------------- !!Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !!From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !<#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> !!Subject: Re: "The operation has timed-out." exception on WinXP !!Date: Wed, 23 Jul 2003 14:06:32 -0500 !!Lines: 217 !!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !!Message-ID: <#sD2G3UUDHA.2368@TK2MSFTNGP09.phx.gbl> !!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl !!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18428 !!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !! !!Hi Yanhong, !! !!I tried to simplify the problem by creating a web service, and then added !!web reference of this web service in a C# console test client. I did not put !!my custom Invoke in the proxy this time. I kept the IIS busy by launching a !!web client and kept the current connection at 10 (maximum allowed by WinXP). !!When I launch the test client, I got the following exception one after !!another: !!The request failed with HTTP status 403: Access Forbidden. !!The operation has timed-out. !!The request failed with HTTP status 403: Access Forbidden. !!The operation has timed-out. !!... !! !!In the test client, the code is simply calling the same method on the web !!service in a while loop. !! !!localhost.Service1 webProxy = new localhost.Service1(); !!while (true) !!{ !! try !! { !! string result = webProxy.Sleep(1000); !! Console.WriteLine("Done. Result = {0}", result); !! } !! catch(Exception e) !! { !! Console.WriteLine("Failed. Exception={0}", e.Message); !! } !!} !!return; !! !!Thanks for your help, !!Joel !! !! !! !!"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !!news:Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl... !!> Hello Joel, !!> !!> Then if you remove this part of code, did you meet this problem? We need !!to isolate the problem before digging into it. :) !!> Thanks very much. !!> !!> Best regards, !!> Yanhong Huang !!> Microsoft Online Partner Support !!> !!> Get Secure! - www.microsoft.com/security !!> This posting is provided "AS IS" with no warranties, and confers no !!rights. !!> !!> -------------------- !!> !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !!> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> !!<WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !!> !Subject: Re: "The operation has timed-out." exception on WinXP !!> !Date: Fri, 18 Jul 2003 11:32:18 -0500 !!> !Lines: 137 !!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !!> !Message-ID: <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> !!> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!> !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl !!> !Xref: cpmsftngxa06.phx.gbl !!microsoft.public.dotnet.framework.aspnet.webserv ices:18362 !!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!> ! !!> !Hi Yanhong, !!> ! !!> !Thank you for the reply. I did not explicitly open any handle so I am not !!> !sure if I what I need to close. !!> ! !!> !In my web proxy class, I created a new Invoke method to replace the base !!> !class's Invoke method. In my Invoke method, I call the base class's !!Invoke, !!> !and added retry if base class's Invoke throws exception. So when IIS !!stays !!> !busy with 10 connections, my Invoke will automatically retry - sleep - !!> !retry - sleep ... for up to MaxRetry. !!> ! !!> !// Replace the base class's Invoke. !!> !protected new object[] Invoke(string methodName, object[] parameters) !!> ! { !!> ! object[] results = null; !!> ! int nRetries = 0; !!> ! do !!> ! { !!> ! try !!> ! { !!> ! results = base.Invoke(methodName, parameters); !!> ! // if we do not have an exception, we will exit the !!> !while loop now. !!> ! break; !!> ! } !!> ! catch(System.Net.WebException webExp) !!> ! { !!> ! // On WinXP, this could be "The request failed with !!HTTP !!> !status 403: Access Forbidden" !!> ! // This also could be ""The operation has timed-out." !!> ! // we need to retry in both cases !!> ! if (nRetries==MaxRetry) !!> ! { !!> ! throw webExp; !!> ! } !!> ! else !!> ! { !!> ! // sleep sometime before retrying !!> ! System.Threading.Thread.Sleep(RetryInterval); !!> ! } !!> ! } !!> ! nRetries++; !!> ! }while(this.EnableRetry==true); !!> ! !!> ! return results; !!> ! } !!> ! !!> ! !!> !Thanks !!> !Joel Zhou !!> ! !!> ! !!> ! !!> !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !!> !news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... !!> !> Hello Joel, !!> !> !!> !> I can't tell exactly where the problem exists now. Have you confirmed !!that !!> !you have closed all the handles, such as stream !!> !> handles, and etc. !!> !> !!> !> Thanks. !!> !> !!> !> Best regards, !!> !> Yanhong Huang !!> !> Microsoft Online Partner Support !!> !> !!> !> Get Secure! - www.microsoft.com/security !!> !> This posting is provided "AS IS" with no warranties, and confers no !!> !rights. !!> !> !!> !> -------------------- !!> !> !Content-Class: urn:content-classes:message !!> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!> !> !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> !!> !> !Subject: "The operation has timed-out." exception on WinXP !!> !> !Date: Wed, 16 Jul 2003 16:03:59 -0700 !!> !> !Lines: 39 !!> !> !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> !!> !> !MIME-Version: 1.0 !!> !> !Content-Type: text/plain; !!> !> ! charset="iso-8859-1" !!> !> !Content-Transfer-Encoding: 7bit !!> !> !X-Newsreader: Microsoft CDO for Windows 2000 !!> !> !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 !!> !> !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== !!> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!> !> !Path: cpmsftngxa06.phx.gbl !!> !> !Xref: cpmsftngxa06.phx.gbl !!> !microsoft.public.dotnet.framework.aspnet.webservi ces:18319 !!> !> !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 !!> !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!> !> ! !!> !> !Our web clients makes synchronous web method calls to a !!> !> !web service on a XP workstation, running .Net 1.1.4322. !!> !> ! !!> !> !When there are already 10 connections to the IIS, the !!> !> !client gets "The request failed with HTTP status 403: !!> !> !Access Forbidden." when calling the web service. This is !!> !> !expected behavior documented by MSDN. However, my problem !!> !> !is if the client (same thread) tries to make the call !!> !> !again after the total connection < 10, it will get "The !!> !> !operation has timed-out." exception first, and then if the !!> !> !client makes the same call again, it will work. !!> !> ! !!> !> !If the IIS connection stays at 10, the client will get !!> !> !those two exceptions one after another. I am expecting the !!> !> !client to always get the "..Access Forbidden" exception. !!> !> ! !!> !> !It seems that after the "...403: Access Forbidden" error, !!> !> !the client will always get a "The operation has timed- !!> !> !out." before it will work again. I set the client side !!> !> !timeout to 30 seconds. The timeout exception happens about !!> !> !90 seconds after making the call. !!> !> ! !!> !> !I am trying to figure out how to avoid the timeout !!> !> !exception. Any suggestions? !!> !> ! !!> !> !The exception call stack is below: !!> !> !Error: System.Net.WebException: The operation has timed- !!> !> !out. !!> !> ! at System.Net.HttpWebRequest.GetRequestStream() !!> !> ! at !!> !> !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke !!> !> !(String methodN !!> !> !ame, Object[] parameters) !!> !> ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g !!> !> !methodName, Object[] p !!> !> !arameters) in !!> !> !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs !!> !> !:line 3 !!> !> ! !!> !> ! !!> !> !!> !> !!> ! !!> ! !!> ! !!> !!> !! !! !! ! ! ! |
Re: "The operation has timed-out." exception on WinXP
Hello Joel,
Our finding till now is that if we enlarge the maximum number of connections to a server or group of servers in the <connectionManagement> element defined in machine.config, the problem will be gone sometimes. We are checking dump of it now. Are you still monitoring the issue? Thanks very much. Best regards, Yanhong Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- !X-Tomcat-ID: 120066908 !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> <#sD2G3UUDHA.2368 @TK2MSFTNGP09.phx.gbl> <lg9AcmcUDHA.2084@cpmsftngxa06.phx.gbl> !MIME-Version: 1.0 !Content-Type: text/plain !Content-Transfer-Encoding: 7bit !From: yhhuang@online.microsoft.com (Yan-Hong Huang[MSFT]) !Organization: Microsoft !Date: Mon, 28 Jul 2003 06:31:12 GMT !Subject: Re: "The operation has timed-out." exception on WinXP !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !Message-ID: <2toqfHNVDHA.2168@cpmsftngxa06.phx.gbl> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !Lines: 269 !Path: cpmsftngxa06.phx.gbl !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18491 !NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 ! !Hi Joel, ! !We are still performing research on it. It may need some more time. Sorry for any inconvenience. ! !Best regards, !Yanhong Huang !Microsoft Online Partner Support ! !Get Secure! - www.microsoft.com/security !This posting is provided "AS IS" with no warranties, and confers no rights. ! !-------------------- !!X-Tomcat-ID: 243274584 !!References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !<#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> <#sD2G3UUDHA.2368 !@TK2MSFTNGP09.phx.gbl> !!MIME-Version: 1.0 !!Content-Type: text/plain !!Content-Transfer-Encoding: 7bit !!From: yhhuang@online.microsoft.com (Yan-Hong Huang[MSFT]) !!Organization: Microsoft !!Date: Thu, 24 Jul 2003 09:54:36 GMT !!Subject: Re: "The operation has timed-out." exception on WinXP !!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!Message-ID: <lg9AcmcUDHA.2084@cpmsftngxa06.phx.gbl> !!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!Lines: 232 !!Path: cpmsftngxa06.phx.gbl !!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18442 !!NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 !! !!Hello Joel, !! !!I did reproduce it on my side. The next exception (timed-out) happens after each 403 error. I will dig into it and reply you with !!more information on it. !! !!Thanks very much. !! !!Best regards, !!Yanhong Huang !!Microsoft Online Partner Support !! !!Get Secure! - www.microsoft.com/security !!This posting is provided "AS IS" with no warranties, and confers no rights. !! !!-------------------- !!!Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !!<#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> !!!Subject: Re: "The operation has timed-out." exception on WinXP !!!Date: Wed, 23 Jul 2003 14:06:32 -0500 !!!Lines: 217 !!!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !!!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !!!Message-ID: <#sD2G3UUDHA.2368@TK2MSFTNGP09.phx.gbl> !!!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!!NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !!!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl !!!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18428 !!!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!! !!!Hi Yanhong, !!! !!!I tried to simplify the problem by creating a web service, and then added !!!web reference of this web service in a C# console test client. I did not put !!!my custom Invoke in the proxy this time. I kept the IIS busy by launching a !!!web client and kept the current connection at 10 (maximum allowed by WinXP). !!!When I launch the test client, I got the following exception one after !!!another: !!!The request failed with HTTP status 403: Access Forbidden. !!!The operation has timed-out. !!!The request failed with HTTP status 403: Access Forbidden. !!!The operation has timed-out. !!!... !!! !!!In the test client, the code is simply calling the same method on the web !!!service in a while loop. !!! !!!localhost.Service1 webProxy = new localhost.Service1(); !!!while (true) !!!{ !!! try !!! { !!! string result = webProxy.Sleep(1000); !!! Console.WriteLine("Done. Result = {0}", result); !!! } !!! catch(Exception e) !!! { !!! Console.WriteLine("Failed. Exception={0}", e.Message); !!! } !!!} !!!return; !!! !!!Thanks for your help, !!!Joel !!! !!! !!! !!!"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !!!news:Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl... !!!> Hello Joel, !!!> !!!> Then if you remove this part of code, did you meet this problem? We need !!!to isolate the problem before digging into it. :) !!!> Thanks very much. !!!> !!!> Best regards, !!!> Yanhong Huang !!!> Microsoft Online Partner Support !!!> !!!> Get Secure! - www.microsoft.com/security !!!> This posting is provided "AS IS" with no warranties, and confers no !!!rights. !!!> !!!> -------------------- !!!> !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> !!!<WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !!!> !Subject: Re: "The operation has timed-out." exception on WinXP !!!> !Date: Fri, 18 Jul 2003 11:32:18 -0500 !!!> !Lines: 137 !!!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !!!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !!!> !Message-ID: <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> !!!> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!!> !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !!!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl !!!> !Xref: cpmsftngxa06.phx.gbl !!!microsoft.public.dotnet.framework.aspnet.webser vices:18362 !!!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!!> ! !!!> !Hi Yanhong, !!!> ! !!!> !Thank you for the reply. I did not explicitly open any handle so I am not !!!> !sure if I what I need to close. !!!> ! !!!> !In my web proxy class, I created a new Invoke method to replace the base !!!> !class's Invoke method. In my Invoke method, I call the base class's !!!Invoke, !!!> !and added retry if base class's Invoke throws exception. So when IIS !!!stays !!!> !busy with 10 connections, my Invoke will automatically retry - sleep - !!!> !retry - sleep ... for up to MaxRetry. !!!> ! !!!> !// Replace the base class's Invoke. !!!> !protected new object[] Invoke(string methodName, object[] parameters) !!!> ! { !!!> ! object[] results = null; !!!> ! int nRetries = 0; !!!> ! do !!!> ! { !!!> ! try !!!> ! { !!!> ! results = base.Invoke(methodName, parameters); !!!> ! // if we do not have an exception, we will exit the !!!> !while loop now. !!!> ! break; !!!> ! } !!!> ! catch(System.Net.WebException webExp) !!!> ! { !!!> ! // On WinXP, this could be "The request failed with !!!HTTP !!!> !status 403: Access Forbidden" !!!> ! // This also could be ""The operation has timed-out." !!!> ! // we need to retry in both cases !!!> ! if (nRetries==MaxRetry) !!!> ! { !!!> ! throw webExp; !!!> ! } !!!> ! else !!!> ! { !!!> ! // sleep sometime before retrying !!!> ! System.Threading.Thread.Sleep(RetryInterval); !!!> ! } !!!> ! } !!!> ! nRetries++; !!!> ! }while(this.EnableRetry==true); !!!> ! !!!> ! return results; !!!> ! } !!!> ! !!!> ! !!!> !Thanks !!!> !Joel Zhou !!!> ! !!!> ! !!!> ! !!!> !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !!!> !news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... !!!> !> Hello Joel, !!!> !> !!!> !> I can't tell exactly where the problem exists now. Have you confirmed !!!that !!!> !you have closed all the handles, such as stream !!!> !> handles, and etc. !!!> !> !!!> !> Thanks. !!!> !> !!!> !> Best regards, !!!> !> Yanhong Huang !!!> !> Microsoft Online Partner Support !!!> !> !!!> !> Get Secure! - www.microsoft.com/security !!!> !> This posting is provided "AS IS" with no warranties, and confers no !!!> !rights. !!!> !> !!!> !> -------------------- !!!> !> !Content-Class: urn:content-classes:message !!!> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!> !> !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> !!!> !> !Subject: "The operation has timed-out." exception on WinXP !!!> !> !Date: Wed, 16 Jul 2003 16:03:59 -0700 !!!> !> !Lines: 39 !!!> !> !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> !!!> !> !MIME-Version: 1.0 !!!> !> !Content-Type: text/plain; !!!> !> ! charset="iso-8859-1" !!!> !> !Content-Transfer-Encoding: 7bit !!!> !> !X-Newsreader: Microsoft CDO for Windows 2000 !!!> !> !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 !!!> !> !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== !!!> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !!!> !> !Path: cpmsftngxa06.phx.gbl !!!> !> !Xref: cpmsftngxa06.phx.gbl !!!> !microsoft.public.dotnet.framework.aspnet.webservi ces:18319 !!!> !> !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 !!!> !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !!!> !> ! !!!> !> !Our web clients makes synchronous web method calls to a !!!> !> !web service on a XP workstation, running .Net 1.1.4322. !!!> !> ! !!!> !> !When there are already 10 connections to the IIS, the !!!> !> !client gets "The request failed with HTTP status 403: !!!> !> !Access Forbidden." when calling the web service. This is !!!> !> !expected behavior documented by MSDN. However, my problem !!!> !> !is if the client (same thread) tries to make the call !!!> !> !again after the total connection < 10, it will get "The !!!> !> !operation has timed-out." exception first, and then if the !!!> !> !client makes the same call again, it will work. !!!> !> ! !!!> !> !If the IIS connection stays at 10, the client will get !!!> !> !those two exceptions one after another. I am expecting the !!!> !> !client to always get the "..Access Forbidden" exception. !!!> !> ! !!!> !> !It seems that after the "...403: Access Forbidden" error, !!!> !> !the client will always get a "The operation has timed- !!!> !> !out." before it will work again. I set the client side !!!> !> !timeout to 30 seconds. The timeout exception happens about !!!> !> !90 seconds after making the call. !!!> !> ! !!!> !> !I am trying to figure out how to avoid the timeout !!!> !> !exception. Any suggestions? !!!> !> ! !!!> !> !The exception call stack is below: !!!> !> !Error: System.Net.WebException: The operation has timed- !!!> !> !out. !!!> !> ! at System.Net.HttpWebRequest.GetRequestStream() !!!> !> ! at !!!> !> !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke !!!> !> !(String methodN !!!> !> !ame, Object[] parameters) !!!> !> ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g !!!> !> !methodName, Object[] p !!!> !> !arameters) in !!!> !> !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs !!!> !> !:line 3 !!!> !> ! !!!> !> ! !!!> !> !!!> !> !!!> ! !!!> ! !!!> ! !!!> !!!> !!! !!! !!! !! !! !! ! ! ! |
Re: "The operation has timed-out." exception on WinXP
Hello Joel,
Based on our testing, the error is related to the release of connection. After we upgrade to VS.NET 2003 and .net framework 1.1, the problem is gone. Could you please test it in VS.NET 2003 and let us know your testing result? Thanks very much. Best regards, Yanhong Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> !Subject: Re: "The operation has timed-out." exception on WinXP !Date: Wed, 23 Jul 2003 14:06:32 -0500 !Lines: 217 !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !Message-ID: <#sD2G3UUDHA.2368@TK2MSFTNGP09.phx.gbl> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18428 !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es ! !Hi Yanhong, ! !I tried to simplify the problem by creating a web service, and then added !web reference of this web service in a C# console test client. I did not put !my custom Invoke in the proxy this time. I kept the IIS busy by launching a !web client and kept the current connection at 10 (maximum allowed by WinXP). !When I launch the test client, I got the following exception one after !another: !The request failed with HTTP status 403: Access Forbidden. !The operation has timed-out. !The request failed with HTTP status 403: Access Forbidden. !The operation has timed-out. !... ! !In the test client, the code is simply calling the same method on the web !service in a while loop. ! !localhost.Service1 webProxy = new localhost.Service1(); !while (true) !{ ! try ! { ! string result = webProxy.Sleep(1000); ! Console.WriteLine("Done. Result = {0}", result); ! } ! catch(Exception e) ! { ! Console.WriteLine("Failed. Exception={0}", e.Message); ! } !} !return; ! !Thanks for your help, !Joel ! ! ! !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !news:Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl... !> Hello Joel, !> !> Then if you remove this part of code, did you meet this problem? We need !to isolate the problem before digging into it. :) !> Thanks very much. !> !> Best regards, !> Yanhong Huang !> Microsoft Online Partner Support !> !> Get Secure! - www.microsoft.com/security !> This posting is provided "AS IS" with no warranties, and confers no !rights. !> !> -------------------- !> !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> !<WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> !> !Subject: Re: "The operation has timed-out." exception on WinXP !> !Date: Fri, 18 Jul 2003 11:32:18 -0500 !> !Lines: 137 !> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 !> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 !> !Message-ID: <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !> !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 !> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl !> !Xref: cpmsftngxa06.phx.gbl !microsoft.public.dotnet.framework.aspnet.webservi ces:18362 !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !> ! !> !Hi Yanhong, !> ! !> !Thank you for the reply. I did not explicitly open any handle so I am not !> !sure if I what I need to close. !> ! !> !In my web proxy class, I created a new Invoke method to replace the base !> !class's Invoke method. In my Invoke method, I call the base class's !Invoke, !> !and added retry if base class's Invoke throws exception. So when IIS !stays !> !busy with 10 connections, my Invoke will automatically retry - sleep - !> !retry - sleep ... for up to MaxRetry. !> ! !> !// Replace the base class's Invoke. !> !protected new object[] Invoke(string methodName, object[] parameters) !> ! { !> ! object[] results = null; !> ! int nRetries = 0; !> ! do !> ! { !> ! try !> ! { !> ! results = base.Invoke(methodName, parameters); !> ! // if we do not have an exception, we will exit the !> !while loop now. !> ! break; !> ! } !> ! catch(System.Net.WebException webExp) !> ! { !> ! // On WinXP, this could be "The request failed with !HTTP !> !status 403: Access Forbidden" !> ! // This also could be ""The operation has timed-out." !> ! // we need to retry in both cases !> ! if (nRetries==MaxRetry) !> ! { !> ! throw webExp; !> ! } !> ! else !> ! { !> ! // sleep sometime before retrying !> ! System.Threading.Thread.Sleep(RetryInterval); !> ! } !> ! } !> ! nRetries++; !> ! }while(this.EnableRetry==true); !> ! !> ! return results; !> ! } !> ! !> ! !> !Thanks !> !Joel Zhou !> ! !> ! !> ! !> !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message !> !news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... !> !> Hello Joel, !> !> !> !> I can't tell exactly where the problem exists now. Have you confirmed !that !> !you have closed all the handles, such as stream !> !> handles, and etc. !> !> !> !> Thanks. !> !> !> !> Best regards, !> !> Yanhong Huang !> !> Microsoft Online Partner Support !> !> !> !> Get Secure! - www.microsoft.com/security !> !> This posting is provided "AS IS" with no warranties, and confers no !> !rights. !> !> !> !> -------------------- !> !> !Content-Class: urn:content-classes:message !> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !> !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> !> !> !Subject: "The operation has timed-out." exception on WinXP !> !> !Date: Wed, 16 Jul 2003 16:03:59 -0700 !> !> !Lines: 39 !> !> !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> !> !> !MIME-Version: 1.0 !> !> !Content-Type: text/plain; !> !> ! charset="iso-8859-1" !> !> !Content-Transfer-Encoding: 7bit !> !> !X-Newsreader: Microsoft CDO for Windows 2000 !> !> !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 !> !> !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== !> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !> !> !Path: cpmsftngxa06.phx.gbl !> !> !Xref: cpmsftngxa06.phx.gbl !> !microsoft.public.dotnet.framework.aspnet.webservi ces:18319 !> !> !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 !> !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es !> !> ! !> !> !Our web clients makes synchronous web method calls to a !> !> !web service on a XP workstation, running .Net 1.1.4322. !> !> ! !> !> !When there are already 10 connections to the IIS, the !> !> !client gets "The request failed with HTTP status 403: !> !> !Access Forbidden." when calling the web service. This is !> !> !expected behavior documented by MSDN. However, my problem !> !> !is if the client (same thread) tries to make the call !> !> !again after the total connection < 10, it will get "The !> !> !operation has timed-out." exception first, and then if the !> !> !client makes the same call again, it will work. !> !> ! !> !> !If the IIS connection stays at 10, the client will get !> !> !those two exceptions one after another. I am expecting the !> !> !client to always get the "..Access Forbidden" exception. !> !> ! !> !> !It seems that after the "...403: Access Forbidden" error, !> !> !the client will always get a "The operation has timed- !> !> !out." before it will work again. I set the client side !> !> !timeout to 30 seconds. The timeout exception happens about !> !> !90 seconds after making the call. !> !> ! !> !> !I am trying to figure out how to avoid the timeout !> !> !exception. Any suggestions? !> !> ! !> !> !The exception call stack is below: !> !> !Error: System.Net.WebException: The operation has timed- !> !> !out. !> !> ! at System.Net.HttpWebRequest.GetRequestStream() !> !> ! at !> !> !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke !> !> !(String methodN !> !> !ame, Object[] parameters) !> !> ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g !> !> !methodName, Object[] p !> !> !arameters) in !> !> !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs !> !> !:line 3 !> !> ! !> !> ! !> !> !> !> !> ! !> ! !> ! !> !> ! ! ! |
Re: "The operation has timed-out." exception on WinXP
>
>Based on our testing, the error is related to the release of connection. After we upgrade to VS.NET 2003 and .net framework >1.1, the problem is gone. Could you please test it in VS.NET 2003 and let us know your testing result? > Folks, writing in this thread to let you know that we are having a simmilar problem with the GetRequestStream() call. Itīs not about web services but I call another webserver from an ASP.NET application. This call seems to time out on every second request. Seems another call is possible only after the worker process gets recycled. Compiled with VS.NET 2002. Now off to install 2003 to see if it works then... Daniel |
Re: "The operation has timed-out." exception on WinXP
On Wed, 30 Jul 2003 13:24:08 GMT, news-daniel-0306@paranor.de (Daniel
Buchholz) wrote: >Now off to install 2003 to see if it works then... Me again! No luck. :-( Used VS.NET 2003 to compile the ASP.NET application but we still get the timeout on the second request. Daniel |
Re: "The operation has timed-out." exception on WinXP
Yanhong,
Thank you for your effort. I am still monitoring the thread and I will try VS.Net 2003. Thanks, Joel "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message news:Jpir0ZmVDHA.2108@cpmsftngxa06.phx.gbl... > Hello Joel, > > Our finding till now is that if we enlarge the maximum number of connections to a server or group of servers in the > <connectionManagement> element defined in machine.config, the problem will be gone sometimes. > > We are checking dump of it now. Are you still monitoring the issue? > > Thanks very much. > > Best regards, > Yanhong Huang > Microsoft Online Partner Support > > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. > > -------------------- > !X-Tomcat-ID: 120066908 > !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> > <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> <#sD2G3UUDHA.2368 > @TK2MSFTNGP09.phx.gbl> <lg9AcmcUDHA.2084@cpmsftngxa06.phx.gbl> > !MIME-Version: 1.0 > !Content-Type: text/plain > !Content-Transfer-Encoding: 7bit > !From: yhhuang@online.microsoft.com (Yan-Hong Huang[MSFT]) > !Organization: Microsoft > !Date: Mon, 28 Jul 2003 06:31:12 GMT > !Subject: Re: "The operation has timed-out." exception on WinXP > !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > !Message-ID: <2toqfHNVDHA.2168@cpmsftngxa06.phx.gbl> > !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !Lines: 269 > !Path: cpmsftngxa06.phx.gbl > !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18491 > !NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 > ! > !Hi Joel, > ! > !We are still performing research on it. It may need some more time. Sorry for any inconvenience. > ! > !Best regards, > !Yanhong Huang > !Microsoft Online Partner Support > ! > !Get Secure! - www.microsoft.com/security > !This posting is provided "AS IS" with no warranties, and confers no rights. > ! > !-------------------- > !!X-Tomcat-ID: 243274584 > !!References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> > !<#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> > <#sD2G3UUDHA.2368 > !@TK2MSFTNGP09.phx.gbl> > !!MIME-Version: 1.0 > !!Content-Type: text/plain > !!Content-Transfer-Encoding: 7bit > !!From: yhhuang@online.microsoft.com (Yan-Hong Huang[MSFT]) > !!Organization: Microsoft > !!Date: Thu, 24 Jul 2003 09:54:36 GMT > !!Subject: Re: "The operation has timed-out." exception on WinXP > !!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > !!Message-ID: <lg9AcmcUDHA.2084@cpmsftngxa06.phx.gbl> > !!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !!Lines: 232 > !!Path: cpmsftngxa06.phx.gbl > !!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18442 > !!NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 > !! > !!Hello Joel, > !! > !!I did reproduce it on my side. The next exception (timed-out) happens after each 403 error. I will dig into it and reply you with > !!more information on it. > !! > !!Thanks very much. > !! > !!Best regards, > !!Yanhong Huang > !!Microsoft Online Partner Support > !! > !!Get Secure! - www.microsoft.com/security > !!This posting is provided "AS IS" with no warranties, and confers no rights. > !! > !!-------------------- > !!!Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!From: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> > !!<#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> > !!!Subject: Re: "The operation has timed-out." exception on WinXP > !!!Date: Wed, 23 Jul 2003 14:06:32 -0500 > !!!Lines: 217 > !!!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 > !!!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > !!!Message-ID: <#sD2G3UUDHA.2368@TK2MSFTNGP09.phx.gbl> > !!!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !!!NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 > !!!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl > !!!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18428 > !!!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > !!! > !!!Hi Yanhong, > !!! > !!!I tried to simplify the problem by creating a web service, and then added > !!!web reference of this web service in a C# console test client. I did not put > !!!my custom Invoke in the proxy this time. I kept the IIS busy by launching a > !!!web client and kept the current connection at 10 (maximum allowed by WinXP). > !!!When I launch the test client, I got the following exception one after > !!!another: > !!!The request failed with HTTP status 403: Access Forbidden. > !!!The operation has timed-out. > !!!The request failed with HTTP status 403: Access Forbidden. > !!!The operation has timed-out. > !!!... > !!! > !!!In the test client, the code is simply calling the same method on the web > !!!service in a while loop. > !!! > !!!localhost.Service1 webProxy = new localhost.Service1(); > !!!while (true) > !!!{ > !!! try > !!! { > !!! string result = webProxy.Sleep(1000); > !!! Console.WriteLine("Done. Result = {0}", result); > !!! } > !!! catch(Exception e) > !!! { > !!! Console.WriteLine("Failed. Exception={0}", e.Message); > !!! } > !!!} > !!!return; > !!! > !!!Thanks for your help, > !!!Joel > !!! > !!! > !!! > !!!"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message > !!!news:Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl... > !!!> Hello Joel, > !!!> > !!!> Then if you remove this part of code, did you meet this problem? We need > !!!to isolate the problem before digging into it. :) > !!!> Thanks very much. > !!!> > !!!> Best regards, > !!!> Yanhong Huang > !!!> Microsoft Online Partner Support > !!!> > !!!> Get Secure! - www.microsoft.com/security > !!!> This posting is provided "AS IS" with no warranties, and confers no > !!!rights. > !!!> > !!!> -------------------- > !!!> !Reply-To: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> > !!!<WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> > !!!> !Subject: Re: "The operation has timed-out." exception on WinXP > !!!> !Date: Fri, 18 Jul 2003 11:32:18 -0500 > !!!> !Lines: 137 > !!!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 > !!!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > !!!> !Message-ID: <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> > !!!> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !!!> !NNTP-Posting-Host: fishrose-cp.frco.com 206.242.150.66 > !!!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl > !!!> !Xref: cpmsftngxa06.phx.gbl > !!!microsoft.public.dotnet.framework.aspnet.webser vices:18362 > !!!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > !!!> ! > !!!> !Hi Yanhong, > !!!> ! > !!!> !Thank you for the reply. I did not explicitly open any handle so I am not > !!!> !sure if I what I need to close. > !!!> ! > !!!> !In my web proxy class, I created a new Invoke method to replace the base > !!!> !class's Invoke method. In my Invoke method, I call the base class's > !!!Invoke, > !!!> !and added retry if base class's Invoke throws exception. So when IIS > !!!stays > !!!> !busy with 10 connections, my Invoke will automatically retry - sleep - > !!!> !retry - sleep ... for up to MaxRetry. > !!!> ! > !!!> !// Replace the base class's Invoke. > !!!> !protected new object[] Invoke(string methodName, object[] parameters) > !!!> ! { > !!!> ! object[] results = null; > !!!> ! int nRetries = 0; > !!!> ! do > !!!> ! { > !!!> ! try > !!!> ! { > !!!> ! results = base.Invoke(methodName, parameters); > !!!> ! // if we do not have an exception, we will exit the > !!!> !while loop now. > !!!> ! break; > !!!> ! } > !!!> ! catch(System.Net.WebException webExp) > !!!> ! { > !!!> ! // On WinXP, this could be "The request failed with > !!!HTTP > !!!> !status 403: Access Forbidden" > !!!> ! // This also could be ""The operation has timed-out." > !!!> ! // we need to retry in both cases > !!!> ! if (nRetries==MaxRetry) > !!!> ! { > !!!> ! throw webExp; > !!!> ! } > !!!> ! else > !!!> ! { > !!!> ! // sleep sometime before retrying > !!!> ! System.Threading.Thread.Sleep(RetryInterval); > !!!> ! } > !!!> ! } > !!!> ! nRetries++; > !!!> ! }while(this.EnableRetry==true); > !!!> ! > !!!> ! return results; > !!!> ! } > !!!> ! > !!!> ! > !!!> !Thanks > !!!> !Joel Zhou > !!!> ! > !!!> ! > !!!> ! > !!!> !"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message > !!!> !news:WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl... > !!!> !> Hello Joel, > !!!> !> > !!!> !> I can't tell exactly where the problem exists now. Have you confirmed > !!!that > !!!> !you have closed all the handles, such as stream > !!!> !> handles, and etc. > !!!> !> > !!!> !> Thanks. > !!!> !> > !!!> !> Best regards, > !!!> !> Yanhong Huang > !!!> !> Microsoft Online Partner Support > !!!> !> > !!!> !> Get Secure! - www.microsoft.com/security > !!!> !> This posting is provided "AS IS" with no warranties, and confers no > !!!> !rights. > !!!> !> > !!!> !> -------------------- > !!!> !> !Content-Class: urn:content-classes:message > !!!> !> !From: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!> !> !Sender: "Joel Zhou" <joel.zhou@emersonprocess.com> > !!!> !> !Subject: "The operation has timed-out." exception on WinXP > !!!> !> !Date: Wed, 16 Jul 2003 16:03:59 -0700 > !!!> !> !Lines: 39 > !!!> !> !Message-ID: <05e601c34bee$8a519d50$a101280a@phx.gbl> > !!!> !> !MIME-Version: 1.0 > !!!> !> !Content-Type: text/plain; > !!!> !> ! charset="iso-8859-1" > !!!> !> !Content-Transfer-Encoding: 7bit > !!!> !> !X-Newsreader: Microsoft CDO for Windows 2000 > !!!> !> !X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > !!!> !> !Thread-Index: AcNL7opR4m2aDJgCSfSToDfa2GQ+3A== > !!!> !> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es > !!!> !> !Path: cpmsftngxa06.phx.gbl > !!!> !> !Xref: cpmsftngxa06.phx.gbl > !!!> !microsoft.public.dotnet.framework.aspnet.webservi ces:18319 > !!!> !> !NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 > !!!> !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es > !!!> !> ! > !!!> !> !Our web clients makes synchronous web method calls to a > !!!> !> !web service on a XP workstation, running .Net 1.1.4322. > !!!> !> ! > !!!> !> !When there are already 10 connections to the IIS, the > !!!> !> !client gets "The request failed with HTTP status 403: > !!!> !> !Access Forbidden." when calling the web service. This is > !!!> !> !expected behavior documented by MSDN. However, my problem > !!!> !> !is if the client (same thread) tries to make the call > !!!> !> !again after the total connection < 10, it will get "The > !!!> !> !operation has timed-out." exception first, and then if the > !!!> !> !client makes the same call again, it will work. > !!!> !> ! > !!!> !> !If the IIS connection stays at 10, the client will get > !!!> !> !those two exceptions one after another. I am expecting the > !!!> !> !client to always get the "..Access Forbidden" exception. > !!!> !> ! > !!!> !> !It seems that after the "...403: Access Forbidden" error, > !!!> !> !the client will always get a "The operation has timed- > !!!> !> !out." before it will work again. I set the client side > !!!> !> !timeout to 30 seconds. The timeout exception happens about > !!!> !> !90 seconds after making the call. > !!!> !> ! > !!!> !> !I am trying to figure out how to avoid the timeout > !!!> !> !exception. Any suggestions? > !!!> !> ! > !!!> !> !The exception call stack is below: > !!!> !> !Error: System.Net.WebException: The operation has timed- > !!!> !> !out. > !!!> !> ! at System.Net.HttpWebRequest.GetRequestStream() > !!!> !> ! at > !!!> !> !System.Web.Services.Protocols.SoapHttpClientProto col.Invoke > !!!> !> !(String methodN > !!!> !> !ame, Object[] parameters) > !!!> !> ! at EasyIt_SDK.EasySoapHttpClientProtocol.Invoke(Strin g > !!!> !> !methodName, Object[] p > !!!> !> !arameters) in > !!!> !> !d:\easyit\code\src\easyit_sdk\easysoaphttpclientp rotocol.cs > !!!> !> !:line 3 > !!!> !> ! > !!!> !> ! > !!!> !> > !!!> !> > !!!> ! > !!!> ! > !!!> ! > !!!> > !!!> > !!! > !!! > !!! > !! > !! > !! > ! > ! > ! > > |
Re: "The operation has timed-out." exception on WinXP
Hi Daniel,
Have you tried to enlarge connections in connectionManagement in machine.config? Best regards, Yanhong Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- !From: news-daniel-0306@paranor.de (Daniel Buchholz) !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es !Subject: Re: "The operation has timed-out." exception on WinXP !Date: Wed, 30 Jul 2003 14:27:29 GMT !Lines: 11 !Message-ID: <3f27d592.3239390@news.cis.dfn.de> !References: <05e601c34bee$8a519d50$a101280a@phx.gbl> <WEe15YPTDHA.2448@cpmsftngxa06.phx.gbl> <#Yg3rpUTDHA.2152@TK2MSFTNGP12.phx.gbl> <Wkyq7TOUDHA.1252@cpmsftngxa06.phx.gbl> <#sD2G3UUDHA.2368 @TK2MSFTNGP09.phx.gbl> <Lln$jrnVDHA.2228@cpmsftngxa06.phx.gbl> <3f27c5e2.121755140@news.cis.dfn.de> !NNTP-Posting-Host: 145.228.10.180 !X-Trace: news.uni-berlin.de 1059575249 23038788 145.228.10.180 (16 [53906]) !X-Newsreader: Forte Free Agent 1.21/32.243 !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fu- berlin.de!uni-berlin.de!145.228.10.180!not-for-mail !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservic es:18537 !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es ! !On Wed, 30 Jul 2003 13:24:08 GMT, news-daniel-0306@paranor.de (Daniel !Buchholz) wrote: ! !>Now off to install 2003 to see if it works then... ! !Me again! ! !No luck. :-( Used VS.NET 2003 to compile the ASP.NET application but !we still get the timeout on the second request. ! !Daniel ! |
| All times are GMT. The time now is 02:19 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.