HttpWebRequest/HttpWebResponse Execution Problem
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I'm issuing a Web Request and the stream i receive in response is empty but when i navigate to the same URL in my browser it's working fine and returning the data. Bellow is the basic code i am using right now.
Dim req As HttpWebRequest = HttpWebRequest.Create("http://192.168.15.40/touchscreens/get.qsp?display=1") Dim res As HttpWebResponse = req.GetResponse Dim sr As New StreamReader(res.GetResponseStream) Dim dataReturned As String = sr.ReadToEnd sr.Close() MsgBox(dataReturned)
What could be the problem? Thanks for your help!
AliAmjad(MCP) First make it Run THEN make it Run Fast!