Web request timeout in c#
        Posted  
        
            by victor_foster
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by victor_foster
        
        
        
        Published on 2010-03-19T07:18:35Z
        Indexed on 
            2010/03/19
            7:21 UTC
        
        
        Read the original article
        Hit count: 400
        
I am trying to make a web service request call to a third part web site who's server is a little unreliable. Is there a way I can set a timeout on a request to this site? Something like this pseudo code:
try for 1 minute
{
    // Make web request here
    using (WebClient client new WebClient())...etc.
}
catch
{
}
© Stack Overflow or respective owner