Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:48:46+00:00 2026-05-26T15:48:46+00:00

I seem to be having an odd issue w/ the ApplicationDeployment.CheckForUpdateAsync Method. I have

  • 0

I seem to be having an odd issue w/ the ApplicationDeployment.CheckForUpdateAsync Method. I have it, currently, on a timer, that checks the server for an update at a predetermined interval. The reason for this is that we need to ensure everyone is on the latest release, and when a new release is available, to notify everyone that it’s available.

However, while it works fine if the server is online, if there is a networking error, or the server goes offline during the check, .NET returns a Socket or WebException error.

I have tried to catch the errors:

        try
        {
            _ad.CheckForUpdateAsync();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }

For example, but even if i put WebException or any other type of exception in that catch, it doesn’t seem to catch it. I assume that’s because the CheckForUpdateAsync() takes place on a seperate thread.

Is there any way to reliably catch those errors so i do not have random .NET errors popping up during operation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:48:47+00:00Added an answer on May 26, 2026 at 3:48 pm

    you can check errors on ApplicationDeployment.CheckForUpdateAsync Method by adding CheckForUpdateCompleted even as below

    ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
    ad.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(ad_CheckForUpdateCompleted);
    

    in the

    void ad_CheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e)
    {
        if (e.Error != null)
        {
           // e.Error details here 
        }
    }
    

    you can find InvalidDeploymentException and DeploymentDownloadException details from the Error property of the CheckForUpdateCompleted event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seem to be having an issue with std::auto_ptr and assignment, such that the object
I am having an issue that I can't seem to figure out. Hopefully somebody
I am having a strange issue that I can't seem to resolve. Here is
I'm having an odd issue with an assembly that is targeting .NET 3.5. When
I seem to be having an odd issue whereby every time I try to
I'm having an odd issue with CALayer drawing for the iPhone. I have a
I'm having a very odd problem that I can't seem to track down. Any
Hi I seem to be having an issue trying to align an H1 tag
I am having a specific leak that I can't seem to dig to the
I seem to be having an issue with Jax-WS and Jax-b playing nicely together.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.