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 8643875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:09:31+00:00 2026-06-12T12:09:31+00:00

Thanks in advance for your time and assistance. I am using Azure Client Library

  • 0

Thanks in advance for your time and assistance.

I am using Azure Client Library (ie. CloudStorageAccount – CloudBlobClient – CloudBlob) to download/upload blobs in a WPF application.

I would like to set a timeout session in my WPF client application to abort attempt to get a cloud blob. This is different that the server-side timeout that I can set on a blob transfer session. I want to do this as internet connectivity where the application will be used has very unstable intermittent connection.

In other words, I try to do BlobContainer.FetchAttributes before actual data transfer to check internet connectivity. If there is no connection, I do not want to wait 90 odd seconds before it times out and throws an exception.

I have already tried setting timeout in BlobRequestOptions but this does not work as it is applicable only once I have a connection.

Have I understood the settings wrong or is there something else I need to setup/configure/code to achieve a quicker timeout?

I can see in Fiddler that StorageClient library is using HTTP behind the scenes and as per some post I read, I have tried setting timeout in app.config as depicted below. This did not work either.

<configuration>
  <system.web>
    <httpRuntime executionTimeout="5" />  
  </system.web>
</configuration>

Sample Timeout using BlobRequest Options:

CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
blobContainer = blobClient.GetContainerReference("abcd");
CloudBlob blob = blobContainer.GetBlobReference(aCloudPath);
BlobRequestOptions bro = new BlobRequestOptions() 
                           { Timeout = TimeSpan.FromSeconds(5) };
blob.DownloadToFile(aLocalPath, bro);

Either options do not work!!

  • 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-06-12T12:09:32+00:00Added an answer on June 12, 2026 at 12:09 pm

    First, changing the httpRuntime executionTimeout in your app.config will not work. This is a setting used server-side by ASP.NET.

    Second, the code with the BlobRequestOptions should work, but there’s a caveat. By default, the BlobClient comes with an exponential backoff retry policy to handle transient conditions (ie: no network access). Between each retry it will wait a bit and then try again.

    If you want to disable this when trying to check for network access, you can simply disable the retry policy:

            blobClient.RetryPolicy = () =>
            {
                return (int currentRetryCount, Exception lastException, out TimeSpan retryInterval) =>
                {
                    retryInterval = TimeSpan.Zero;
                    return false;
                };
            };
    

    Be sure to only disable this for when you’re testing the network access, don’t disable this for your actual requests.

    Oh and by the way, why don’t you simply use something that already exists to check the internet connection? There are a few APIs available in Windows, like InternetCheckConnection.

    And if your connection is unstable, it might be a better idea to improve the retry policy instead of disabling it (look at TOPAZ for example).

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

Sidebar

Related Questions

Thanks for your time and assistance in advance. I am using TPL from WPF
and thanks in advance for your time. We are using CSLA 3.5.1, although, ultimately,
Thanks in advance for your assistance. I have the following exported part: [Export (typeof(INewComponent))]
Thanks in advance for taking the time to read my question. I'm using MySQL
Thanks in advance for your time :-) I am working on an MVC3 application
Thanks in advance for your time. I have a deeply nested XML whose XSLT
and thanks in advance for your time and attention! My android app that uses
Firstly thanks in advance for your time looking at this question. I'm trying to
First time asking a question here so thanks in advance for your time. I
Thanks in advance for your help. I have a need within an application to

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.