![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | WebService and Timeout Hi. I'm dealing with scenario when call to any web method ends up with timeout and I try to add the user a chance to retry (wait a little bit) My service proxy code looks like this: AsyncCallback cb = new AsyncCallback(ServiceCallback); IAsyncResult result1 = BeginInvoke(methodName, parameters, cb, this); if(result1.IsCompleted == false) { while(true) { bTO = result1.AsyncWaitHandle.WaitOne(Timeout, true); if(bTO == false)//time out occured { //display window and ask the user to wait a moment, user press OK when it sure that web method finished } if(result1.IsCompleted) break; } object[] ret = EndInvoke(result1);// error every time when time out occured (bTO = false) } My scenario is following: 1. BeginInvoke initialize asynch web method call 2. WaitOne waits for Timeout miliseconds 3. WaitOne returns false because timeout occured, and wait screen is displayed. When user close it the web methos is finished. 4. result1.IsCompleted is true so I expect that EndInvoke shall return the results but it throws excpetion "timeout" !!!. Why? Everything works fine if timeout doesn't occure. Thanks for any advise Shark |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WebService and Timeout "shark" <mark@xxxxxx> wrote in message news:fva0if$88r$1@xxxxxx You do know there is a MS.Public.dotnet.framework.webservices? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: WebService and Timeout Increase timeout value in http-runtime tag in web-config of Web Services project. http://www.powupload.com/System.Web....timed-out.aspx HTH Michel "shark" <mark@xxxxxx> schreef in bericht news:fva0if$88r$1@xxxxxx Quote: > Hi. > > I'm dealing with scenario when call to any web method ends up with timeout > and I try to add the user a chance to retry (wait a little bit) > My service proxy code looks like this: > > AsyncCallback cb = new AsyncCallback(ServiceCallback); > IAsyncResult result1 = BeginInvoke(methodName, parameters, cb, this); > if(result1.IsCompleted == false) > { > while(true) > { > bTO = result1.AsyncWaitHandle.WaitOne(Timeout, true); > if(bTO == false)//time out occured > { > //display window and ask the user to wait a moment, user press > OK when it sure that web method finished > } > if(result1.IsCompleted) > break; > } > object[] ret = EndInvoke(result1);// error every time when time out > occured (bTO = false) > } > My scenario is following: > 1. BeginInvoke initialize asynch web method call > 2. WaitOne waits for Timeout miliseconds > 3. WaitOne returns false because timeout occured, and wait screen is > displayed. When user close it the web methos is finished. > 4. result1.IsCompleted is true so I expect that EndInvoke shall return the > results but it throws excpetion "timeout" !!!. Why? > Everything works fine if timeout doesn't occure. > > Thanks for any advise > Shark |
My System Specs![]() |
| | #4 (permalink) |
| | Re: WebService and Timeout Thanks, but I try to get the user a possibility to wait another 'timeout'. Increasing this value doesn't help me. "Michel Posseth [MCP]" <MSDN@xxxxxx> wrote in message news:%23cRhLCdrIHA.4492@xxxxxx Quote: > Increase timeout value in http-runtime tag in web-config of Web Services > project. > > http://www.powupload.com/System.Web....timed-out.aspx > > > HTH > > Michel > > > > > > > "shark" <mark@xxxxxx> schreef in bericht > news:fva0if$88r$1@xxxxxx Quote: >> Hi. >> >> I'm dealing with scenario when call to any web method ends up with >> timeout and I try to add the user a chance to retry (wait a little bit) >> My service proxy code looks like this: >> >> AsyncCallback cb = new AsyncCallback(ServiceCallback); >> IAsyncResult result1 = BeginInvoke(methodName, parameters, cb, this); >> if(result1.IsCompleted == false) >> { >> while(true) >> { >> bTO = result1.AsyncWaitHandle.WaitOne(Timeout, true); >> if(bTO == false)//time out occured >> { >> //display window and ask the user to wait a moment, user press >> OK when it sure that web method finished >> } >> if(result1.IsCompleted) >> break; >> } >> object[] ret = EndInvoke(result1);// error every time when time out >> occured (bTO = false) >> } >> My scenario is following: >> 1. BeginInvoke initialize asynch web method call >> 2. WaitOne waits for Timeout miliseconds >> 3. WaitOne returns false because timeout occured, and wait screen is >> displayed. When user close it the web methos is finished. >> 4. result1.IsCompleted is true so I expect that EndInvoke shall return >> the results but it throws excpetion "timeout" !!!. Why? >> Everything works fine if timeout doesn't occure. >> >> Thanks for any advise >> Shark > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| .Net 2.0 issue with HttpWebRequest/Proxy breaking WebService | .NET General | |||
| UAC Timeout ?!? | .NET General | |||
| creating a powershell webservice | PowerShell | |||
| Name collision using connect-webservice | PowerShell | |||