Timers and WebServices

  • Thread starter Thread starter stewartmclean
  • Start date Start date
S

stewartmclean

Can anyone explain this strange behaviour?

Create a windows application.
Add a timer (interval 1000, enabled=false).
Start the timer on form_load
In the event handler for the timer:
disable the timer
call a webservice
enable the timer

If you step over the webservice call you get a dialogbox saying 'no
source code available for the current location'. If you just run it
with a breakpoint on the line after the webservice then it will not
get hit.

Its not that I can't work around it, I just wondered if anyone could
explain it as it might have further reaching implications that I don't
understand.

Thanks,
Stewart
 
Hi Stewart,
A test button on the form displays 'normal' behaviour in its event handler?
i.e. dummy code;
call Webservice;
dummy code;// with break point
if not then suspect a change to the web service and you need to refresh your
reference.
fwiw
bob
 
Hi Stewart,
A test button on the form displays 'normal' behaviour in its event handler?
i.e. dummy code;
call Webservice;
dummy code;// with break point
if not then suspect a change to the web service and you need to refresh your
reference.
fwiw









- Show quoted text -

Yes doing the work in a buttons event handler works fine.
Strangely it also works when the timer is started from a buttons event
handler, rather than in form_load.

Ive reproduced the problem on a couple of machines, in new projects,
with just the bare minimum of code as described in initial post.
 
Back
Top