The web service doesn't care about the Timeout property

I'm using the auto-generated (with wsdl.exe and GUI-based Add Web Link command) for LyricWiki.org . However, since my internet connection has sucked lately, it takes a while to finish and annoys me.

I'm trying to make it timeout of 2000ms using the .Timeout property, but it still hangs. I also tried using the CallWithTimeout function on this page but didn't go. Also tried the asynchronous versions of the commands, but I want to cancel them after the specified 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 cleaning up StackOverflow in the last hour, but I haven't found a solution yet :(

+1


source to share


1 answer


I believe the timeout is in seconds, not milliseconds. At least that's how it works with hand-crafted WCF stuff.



0


source







All Articles