Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2012 Problem with DownloadString

$
0
0
I'm working on a program, and I'm making my first check for update. What I'm doing is having it download string from my website and checking for it being outdated or not. Problem is, when my website is on the download string it doesn't work, but something like google does. It is a new .com website so I don't know if that could be why, or some website property I have, but it works with my homepage. The website I'm trying to reach is http://www.j2-dev.com/commonmultiplier.php

Thanks,
J2Dev

Code:

    Sub CheckForUpdate()
        If outdated = True Then
            Timer1.Stop()
        Else
            Timer1.Stop()
            Static updateSource As String = (New Net.WebClient).DownloadString("http://www.j2-dev.com/commonmultiplier.php")
            If updateSource.ToLower.Contains("page not found") Then Throw New Exception
            If Not updateSource.ToLower.Contains("v1.0") Then
                toolOutdate.ForeColor = Color.Red
                toolOutdate.Text = "OUTDATED!  GO TO www.J2-Dev.com to Update!"
                outdated = True
            End If
        End If
    End Sub


Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>