Re: Timeout on web service call



Well. After poking around in the docs for awhile, I have something like
this:

t1 = New System.Windows.Forms.Timer
t1.Interval = 5000
AddHandler t1.Tick, AddressOf T1tick
Dim callback As System.AsyncCallback
Dim ar As IAsyncResult
ar = ws.BeginMyCall(MyWSParam, callback, Nothing)
t1.Enabled = True
ar.AsyncWaitHandle.WaitOne()
MyWSResult = ws.EndMyCall(ar)

The web service is set to sleep for 20 seconds, but I still don't get a
timer hit. I thought a timer created a thread, but perhaps it is also
getting blocked by WaitOne? Also, I still don't see any result from
setting ws.Timeout.

Any help is greatly appreciated,
Thanks,
DaveO.


<ctacke/> wrote:
Are you calling the method asynchronously (i.e. calling BeginMyMethod and
using the callback's waithandle)?

-Chris


"DaveO." <daveoverbeck@xxxxxxxxx> wrote in message
news:1147814436.759627.225640@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm trying to put a time limit on a web service call in case it takes a
long time for whatever reason. First I tried to use a Timer, but got no
response. I can get a Timer to work fine in a simple case, like just
exiting a form, but it seems that when I call a web service the system
is too busy to pay attention.

Then I discovered that the web service itself has a Timeout attribute.
But this also does nothing. I tried making the call both with and
without a try/catch block.

Clearly someone thinks this is a reasonable thing to do. What am I
missing here??

Thanks,
Dave


.



Relevant Pages

  • Timeout on web service call
    ... I'm trying to put a time limit on a web service call in case it takes a ... long time for whatever reason. ... I can get a Timer to work fine in a simple case, ... but it seems that when I call a web service the system ...
    (microsoft.public.pocketpc.developer)
  • Re: streamwriter file lock (re-post)
    ... How do you know the other app will never try to run at the exact same moment as your timer? ... I'm surprised you use .NET and VB for this type of thing - I'd suggest using PERL for Web Service interaction. ... Private Sub myTimer_Elapsed ... Dim drCebos As DataRow ...
    (microsoft.public.vsnet.general)
  • Web Service (or Timer) Randomly Ending
    ... service's timer to run, the timer would log entries indefinitely until ... IIS service. ... I've now deployed the web service to a shared hosting environment (IIS ... is there an event or something I can trap to write ...
    (microsoft.public.dotnet.framework.webservices)
  • Web Service (or Timer) Randomly Ending
    ... I've built a .NET 2.0 web service and tied it into an ASP.NET 2.0 web ... service's timer to run, the timer would log entries indefinitely ... IIS service. ... is there an event or something I can trap to ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Implementing scheduler in web service
    ... windowsservice AND webservice solution? ... I would like to use web service interface to ... >timer. ... >the timer in a Windows Service and use the web service to ...
    (microsoft.public.dotnet.framework.webservices)

Loading