Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - WebService and Timeout

Reply
 
Old 04-30-2008   #1 (permalink)
shark


 
 

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 SpecsSystem Spec
Old 04-30-2008   #2 (permalink)
Mr. Arnold


 
 

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 SpecsSystem Spec
Old 05-04-2008   #3 (permalink)
Michel Posseth [MCP]


 
 

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 SpecsSystem Spec
Old 05-05-2008   #4 (permalink)
shark


 
 

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 SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46