tags:

views:

51

answers:

1

I have a timer that is checking to see if a web page exists every 3 seconds. If the page exists it calls a method, if it doesn't, another method.

webReq = WebRequest.Create("websiteaddress")
Dim webResponse As HttpWebResponse
webMessage = ""
'Get the response. 
Try
   WebResponse = CType(webReq.GetResponse(), HttpWebResponse)
Catch ex As Exception
  webMessage = ex.Message
End Try

If I comment out this code the ticker runs just fine, but when it is active the ticker stops after 2 ticks. Any ideas? Thanks.

+1  A: 

The answer is I never close the webResponse. Thanks!

Shawn