WebRequest - Taking more time in getting response

webrequest , asp.net , csharp India
  • 11 years ago
    string strThumbnail = "http://someurl.com/thumbnail.jpg"; System.Net.WebRequest serverRequest = System.Net.WebRequest.Create(strThumbnail); try { serverRequest.GetResponse().Close(); objDet.thumbnail = strThumbnail; } catch (Exception exp) { objDet.thumbnail = string.Empty; } Actually i want to just chk a list of urls in a loop whether the thumbnails(jpg image) exists or not. For that am doin the code as shown above. And the problem is its taking too much of time to get a response. As a result end user is kept waiting for more than ten mins. I have tried giving timeout also. Can n e one suggest me a better soultion.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Nine people can't make a baby in a month.” - Fred Brooks