views:

322

answers:

1

I'm using an automatically created (with wsdl.exe and the GUI-based "Add web reference" command) web service for LyricWiki.org. However, since my internet connection is sucking lately, it's been taking ages to complete and is annoying me.

I'm trying to make it timeout in 2000ms by using the .Timeout property, but it still hangs. I also tried using the CallWithTimeout function from this page, but no go. Have also tried the async versions of the commands, but I want to cancel it after the mentioned time.

var lw = new LyricWiki();
lw.Timeout = 1000;
LyricsResult result = lw.getSong(artistName, trackName);
// Hangs for a long time...
lyrics = result.lyrics;
lyricsURL = result.url;

Any suggestions? Been scouring StackOverflow for the past hour, but I haven't found a solution yet :(

A: 

I believe the timeout is specified in seconds, not milliseconds. At least that's the way it works with manually-created WCF stuff.

Robert C. Barth
Tried that, still no go. I believe MSDN says it's in ms
hb