Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

XML with non standard port

orbital01orbital01 Posts: 1Member
Hi im trying to write a programme that will extract information from an xml file created by a local server. Anyway if i save the file on my desktop using firefox i dont have any problems but if i try to get vb.net to access the file it just comes up with this error "The server committed a protocol violation. Section=ResponseStatusLine". Now i think this has something to do with the fact that i have to use a specified port number. I have spent the last copuple of days searching the net for any help and now hope that someone here will be able to help.
Here is my code

[code]Imports System.Xml
Imports System.net
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim WhatsOnNow As String
Dim NowInfo(0 To 5) As String
Dim i
Dim request As String
request = "C:Documents and SettingsOrbitalDesktopKBEpgDataRes.xml"
Dim reader As XmlTextReader = New XmlTextReader(request)
Try
reader.Read()
reader.ReadToFollowing("epg")
If reader.HasAttributes = True Then
i = 0
Do
NowInfo(i) = reader(i)
i = i + 1
Loop Until i = 5
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try[/code]

Thanks for any help

Sign In or Register to comment.