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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:40:33+00:00 2026-06-15T14:40:33+00:00

In my program, I have multiple points where it connects to Blob storage to

  • 0

In my program, I have multiple points where it connects to Blob storage to read/write files. They all work fine. However, in a different function but the same class as where another Blob storage reference is made, I am getting an ArgumentNullException stating “Value cannot be null” from the following line of code:

CloudStorageAccount account = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));

I know the StorageConnectionString is properly configured, because when I remove the line of code using this function, the same line of code works in other functions. Can anyone provide some insight as to why this one function is causing a problem, but not the others?

Not sure if this would be too helpful, but here’s the 4 lines of code I’m using. It’s pretty standard.

CloudStorageAccount account = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
CloudBlobClient client = account.CreateCloudBlobClient();
CloudBlobContainer container = client.GetContainerReference(CONTAINER);
CloudBlockBlob blob = container.GetBlockBlobReference(FilePath(null, imageId));
  • 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-15T14:40:35+00:00Added an answer on June 15, 2026 at 2:40 pm

    Based on your comment this could be related to the fact that you store the connection string in the web.config. In some cases it might look like your code is running in the same process, but in reality it isn’t. Take the WebRole.cs/WorkerRole.cs classes for example. Simply put, the code in these classes will run in a different process, which means they won’t have access to your web.config. The WebRole.cs will read its settings from the WaIISHost.exe.config file for example.

    Could you remove the connection string from the web.config and add it to the service configuration instead? You don’t need to modify the code since the CloudConfigurationManager will look in the service configuration first, and if it doesn’t find the setting here it will fall back to the web/app.config

    enter image description here

    Note: In this answer I’m assuming you are using a Web Role and not a Web Site.

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

Sidebar

Related Questions

I have a program that creates multiple text files of rdf triples. I need
I have multiple custom NSViews in my Cocoa program. I am looking for a
I have a program that works with multiple threads. For each I set uncaught
I have a C# Winforms program with multiple textboxes. I used the properties for
I'm creating a program in VB.NET to output multiple images. Some images will have
I'm having problems, while sending multiple attachments in my program. I didn't have any
I have program that has a variable that should never change. However, somehow, it
I have a scenario where, at certain points in my program, a thread needs
I have this program, where i need to print out the attributes of multiple
I know that both of these two functions work with multiple points on my

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.