Solved

c# WebClient timeout

Posted on 2008-10-27
1
1,673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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