[Help] With auto-updater

Posts 1–9 of 9 · Page 1 of 1
[Help] With auto-updater
Okay so I was looking at Ugleh's tut in the sticky about making an auto updater.

I don't get any errors or anything but it doesn't work because when I open the link to

www.MYWEBSITEBLAHBLAH.com/Version.txt it doesn't open the Version.txt, it just has a blank screen so it can't read the value and compare it to the build number.

This is what happens when i call my ftp site:



If anyone could help me fix this or suggest an alternate "new version" checker method it would be much appreciated.

Thanks

J-Deezy
Hmm.... I think the version.txt is empty. Try to re-upload it. If you've done all that, then try this:


[php]Dim Temp as string=My.Computer.Filesystem.GetTempFilename() & rnd() *10000
My.Computer.Network.DownloadFile("http://www.mywebsiteblahblah.com/Version.txt",Temp)
Dim read as string = My.Computer.FileSystem.ReadAllText(Temp)
If not read = vbnullString Then
Msgbox ("Check version here...")
End If
My.Computer.FileSystem.DeleteFile(Temp,FileIO.UIOp tion.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently, FileIO.UICancelOption.ThrowException)
[/php]

This code should work for you if the version.txt file is not empty...Working fine for me.

Hope this helps !!
Hmm...I reuploaded, made a new FTP site and reuploaded there..didn't work

Then I tried your code but it's having the save problem with there being nothing there i think.

I editted your code to this

Code:
        Dim Temp As String = My.Computer.FileSystem.GetTempFileName() & Rnd() * 10000
        My.Computer.Network.DownloadFile("http://MyWebsiteOMGITSSECRET/Version.txt", Temp)
        Dim read As String = My.Computer.FileSystem.ReadAllText(Temp)

        MsgBox(read)

        My.Computer.FileSystem.DeleteFile(Temp, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently, FileIO.UICancelOption.ThrowException)
Just to check if it was reading anything. The message box never popped up so i dunno wtf is going on.

EDIT: Okay it's encountering an error with .404 Not found. Im not sure what the problem is lol cos the link works fine.
Code:
Imports System.Io

[...]

Sub LoadNotice()
        Try
            Dim request As HttpWebRequest = WebRequest.Create(strNotice)
            Dim response As HttpWebResponse = request.GetResponse()
            Dim reader As StreamReader = New StreamReader(response.GetResponseStream())
            Richtextbox1.Text = reader.ReadToEnd()
            response.Close()
            reader.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
If this is not working, your ftp is fked.
Am I supposed to change StrNotice to something cos it's not declared?

Im choob at this webrequest stuff.

And the ftp is working fine for downloading my other files, it's the "version.txt" file that it just doesn't want to download.
#Region "Settings"
Const strNotice As String = "http://link-to-your/notice.txt"

#End Region
Nothing I'm pretty sure it's the FTP, not the code. Can anyone recommend a good free webhost site just for the version.txt file haha. I was using 000webhost.com and it's not working.
Quote Originally Posted by Jason View Post
Nothing I'm pretty sure it's the FTP, not the code. Can anyone recommend a good free webhost site just for the version.txt file haha. I was using 000webhost.com and it's not working.
Buddy your Ftp is poor......codes should work !!!

Anywayz Search Google for "Yola Sites"...Its free and supports file uploads !!
bplaced

google for it.
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us