Set timeout on RSS load?

liunx

Guest
I've got a "My News" section on a site I'm developing where the users can select and display results from multiple RSS feeds from multiple locations. I've set it up such that if a request returns an error, i.e. the xml file is broken or not up or taking too long etc., it simply displays an informative message and goes on to the next one.

Here's my problem: The xml files can take up to 90 seconds to time out sometimes. Is there a way to set a timeout on "xmlDoc.Load(Server.UrlPathEncode(URL))"? Say, after 5 seconds of unsuccessfully trying to retrieve a feed it throws an error, triggering the code to go on to the next feed.

Any help would be greatly appreciated.

Thanks,
Dan
 
Back
Top