Comet system forum

Discussion forum about Comet system products

Temperature, Humdity,

Pressure Transmitters

and Data Loggers

You are not logged in.

#1 05-11-2007 17:22:50

pal
Member
Registered: 05-11-2007
Posts: 2

VB, WebRequest & T3511

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

 

#2 06-11-2007 09:28:13

JindrichP
Administrator
Registered: 25-06-2007
Posts: 27

Re: VB, WebRequest & T3511

You have to add this to your application configuration file:

<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>

Offline

 

#3 06-11-2007 23:24:16

pal
Member
Registered: 05-11-2007
Posts: 2

Re: VB, WebRequest & T3511

Thanks, worked a treat.

Offline

 

Board footer

Powered by PunBB | CZ / SK
© Copyright 2002–2005 Rickard Andersson