Skip to content

Tag Archives: streamreader

How do I use System.IO.StreamReader in VB 2005 to access XML files on the web, it seems to be local files only

How do I use the System.IO.StreamReader() function in VB.NET 2005 to access XML files on the web, it seems to be local files only. It throws back a "URI not allowed" error when I try to compile. Here’s the code… Dim sr As New System.IO.StreamReader("http://domain.com/file.xml") Any help would be appreciated. Thanks.