Stuck at Downloading Update

Oct 16, 2014 at 2:40 PM
Hello, I have successfully added the reference for AutoUpdater.NET and get a notification when starting my app that a new version is available. When I click on update, the Downloading Update progress window appears but the progress bar does not move and nothing is downloading. What am I doing wrong? Thanks!
Coordinator
Oct 16, 2014 at 4:06 PM
Please post download URL you are using in XML file.
Oct 16, 2014 at 4:44 PM
I actually just came up with a different solution. I don't know if I left a segment out somewhere, but I uncommented the AutoUpdater.OpenDownloadPage = true;, and it worked like I expected it to. Another quick question for you, is there an easy way force the user to download the update? Thanks!!
Coordinator
Oct 16, 2014 at 6:03 PM
Edited Oct 16, 2014 at 6:04 PM
Only set OpenDownloadPage to true, if you want to open download page in web browser when user presses Update. You can force the user to download the update by handling AutoUpdater.CheckForUpdateEvent and check if IsUpdateAvailable property given by event arguments is true. If it's true then use DownloadUpdate() function to download the update.
private void FormMain_Load(object sender, EventArgs e)
{
    AutoUpdater.CheckForUpdateEvent += AutoUpdaterOnCheckForUpdateEvent;
    AutoUpdater.Start("URL of your XML file.");
}

private void AutoUpdaterOnCheckForUpdateEvent(UpdateInfoEventArgs args)
{
    if (args != null)
    {
        if (args.IsUpdateAvailable)
        {
            AutoUpdater.DownloadUpdate();
        }
    }
    else
    {
        MessageBox.Show(
               @"There is a problem reaching update server please check your internet connection and try again later.",
               @"Update check failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}