I'm trying to write a text file to my server via Visual Basic, and then open it up as well. I have this so far!
The code is fine, it just says there is an InternalException error when I try to run it. I'd really like some help on this, I'm pretty stumped myself...and MSDN isn't helping very much either!
Thanks!
Code:
Â
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
...
Public Class Form1
  Dim read, writer As String
  Dim objStream As Stream
  Dim sr As IO.StreamReader = IO.File.OpenText("http://www.plaidapple.ithaca-ny.com/text.txt")
  Dim sw As IO.StreamWriter = IO.File.CreateText("http://www.plaidapple.ithaca-ny.com/text.txt")
  Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInput.Click
    Dim sURL, read As String
    Dim objStream As Stream
    Dim wrGETURL As WebRequest
    sURL = "http://www.plaidapple.ithaca-ny.com/test.txt"
    wrGETURL = WebRequest.Create(sURL)
    objStream = wrGETURL.GetResponse.GetResponseStream()
    read = sr.ReadLine
    lstOutput.Items.Add(read)
    objStream.Close()
  End Sub
End Class
Â
The code is fine, it just says there is an InternalException error when I try to run it. I'd really like some help on this, I'm pretty stumped myself...and MSDN isn't helping very much either!
Thanks!