Discussion forum about Comet system products
You are not logged in.
Hi,
I need some help. I'm using VB under VS2005 to talk to a T3511. I'm not familiar with the web side of things so I just want to do a quick and dirty get of a web page using the code below and I'll parse the values myself. The code below throws with a "The server committed a protocol violation. Section=ResponseHeader Detail=Header name is invalid" (in fact it returns the same error for all of the pages returned by the T3511 that I've tried). T3511: Firmware is 1-5-1.00, WebVersion = 2.00.
Note that the T3511 responds to Internet Explorer just fine.
Public Sub DoRequest()
Dim sUri As String = "http://10.1.1.30/epocasi.html"
Dim WRequest As WebRequest = WebRequest.Create(sUri)
Dim WResponse As WebResponse = WRequest.GetResponse
End Sub
Thanks,
Peter
Offline
You have to add this to your application configuration file:
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
Offline
Thanks, worked a treat.
Offline