Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net - Net.HttpWebResponse Hangs randomly

Status
Not open for further replies.

joejack0330

Technical User
Jan 27, 2006
95
US
Hi, this is running on windows mobile device compact framework. Can't seem to find any logic to it. Sometimes hangs on 3rd try and sometimes can be on 100th and hen it hangs, it doesn't timeout, just keeps going until have to reboot device. Have tried adding timeouts but no effect. Hope this is enough info so hoping maybe someone has seen something like this? Thanks.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim req As Net.HttpWebRequest = DirectCast(Net.HttpWebRequest.Create(" Net.HttpWebRequest)
Dim res As Net.HttpWebResponse = DirectCast(req.GetResponse, Net.HttpWebResponse)
Dim img As Image = New System.Drawing.Bitmap(res.GetResponseStream)
PictureBox2.SizeMode = PictureBoxSizeMode.StretchImage
res.Close()
Me.PictureBox2.Image = img
End Sub
Catch
End Try
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top