Solved

c# WebClient timeout

Posted on 2008-10-27
1
1,669 Views
Last Modified: 2013-12-17
Hello everyone,
           I am looking for a solution to a C# WebClient timeout issue.
           WebClient appears to have no way of timing out.
           Currently using Thread.Start to launch methods which call WebClient, using Thread.Join(MILLISECONDS) for a timeout.

          Using Thread.Start feels like overkill for my needs.
          (I am hitting 100's of devices using credentials and a simple HTTP request and simply need a way to timeout within 10 seconds)
Thanks :)
0
Comment
Question by:darkxer878
1 Comment
 
LVL 11

Accepted Solution

by:
jgordos earned 500 total points
ID: 22818995
There is no way to timeout on a web request... your only real option is to kill the connection yourself after your timer goes off.. so yeah, Threads are your FRIEND...

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question