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

  • Home
  • SEARCH
  • 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 8721861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:17:25+00:00 2026-06-13T07:17:25+00:00

I’m getting the following exception when trying to upload a file with the following

  • 0

I’m getting the following exception when trying to upload a file with the following code:

            string encodedUrl = "videos/Sample.mp4"
            CloudBlockBlob encodedVideoBlob = blobClient.GetBlockBlobReference(encodedUrl);
            Log(string.Format("Got blob reference for {0}", encodedUrl), EventLogEntryType.Information);
            encodedVideoBlob.Properties.ContentType = contentType;
            encodedVideoBlob.Metadata[BlobProperty.Description] = description;
            encodedVideoBlob.UploadFile(localEncodedBlobPath);

I see the “Got blob reference” message, so I assume the reference resolves correctly.

Void Run() C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs (40)
System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
   at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
   at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(Stream source, BlobRequestOptions options)
   at Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFile(String fileName, BlobRequestOptions options)
   at EncoderWorkerRole.WorkerRole.ProcessJobOutput(IJob job, String videoBlobToEncodeUrl) in C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs:line 144
   at EncoderWorkerRole.WorkerRole.Run() in C:\Inter\Projects\PoC\WorkerRole\WorkerRole.cs:line 40

Interestingly, I’m running that same snippet from an on-premises server i.e., outside of Azure and it works correctly.

Ideas welcome, thanks!

  • 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-13T07:17:26+00:00Added an answer on June 13, 2026 at 7:17 am

    Found the culprit!

    Basically, problem was in this line

    encodedVideoBlob.Metadata[BlobProperty.Description] = description;

    There’s a check well down that makes sure no null or empty metadata is being set. Found it by disassembling from Reflector and searching for ArgumentNullException ocurrences.

    Could be great to catch and re-throw a more meaningful exception up in the stack 🙂

    Here are the interesting methods:

    internal static void AddMetadata(HttpWebRequest request, NameValueCollection metadata)
    {
        if (metadata != null)
        {
            foreach (string str in metadata.AllKeys)
            {
                AddMetadata(request, str, metadata[str]);
            }
        }
    }
    
    internal static void AddMetadata(HttpWebRequest request, string name, string value)
    {
        CommonUtils.AssertNotNullOrEmpty("value", value);
        request.Headers.Add("x-ms-meta-" + name, value);
    }
    
    
    internal static void AssertNotNullOrEmpty(string paramName, string value)
    {
        AssertNotNull(paramName, value);
        if (string.IsNullOrEmpty(value))
        {
            throw new ArgumentException(Microsoft.WindowsAzure.SR.ArgumentEmptyError, paramName);
        }
    }
    
    internal static void AssertNotNull(string paramName, object value)
    {
        if (value == null)
        {
            throw new ArgumentNullException(paramName);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following exception when trying to open HPROF file (created by
Hi following is my code...I am trying to synchronize 2 database.. but getting exception
I am trying to upload file to rackspace cloud file using the following code:
I am getting the following exception while trying to write an .xlsx file using
trying to use hibernate with my web app and getting following exception: Initial SessionFactory
I'm getting the following exceptions when trying to load a particular layout file in
I am getting the following exception when trying to run my jar through java
Hopefully I'm even asking my question correctly. I'm getting the following exception while trying
I'm trying to figure out why I'm getting the following exception when a client
so I'm trying to upload then parse a text file with the following format:

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.