Re: Timeout on web service call
- From: "DaveO." <daveoverbeck@xxxxxxxxx>
- Date: 17 May 2006 13:15:51 -0700
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
.
- References:
- Timeout on web service call
- From: DaveO.
- Re: Timeout on web service call
- From: <ctacke/>
- Timeout on web service call
- Prev by Date: UDP Broadcast
- Next by Date: Manage Multiple Forms
- Previous by thread: Re: Timeout on web service call
- Next by thread: Re: Forms and Memory: Hide() then Show() frees up memory???
- Index(es):
Relevant Pages
|
Loading