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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:00:44+00:00 2026-06-14T10:00:44+00:00

I seem to be getting a 403: HTTP/1.1 403 Server failed to authenticate the

  • 0

I seem to be getting a 403:

HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

This happens when I use set the HttpWebRequest.DefaultCachingPolicy in the app.config as follows:

<system.net>
 <requestCaching defaultPolicyLevel="Default" isPrivateCache="false">
  <defaultHttpCachePolicy policyLevel="Default"/>
 </requestCaching>
</system.net>

I’m doing this because I have legacy code which I do not control that is calling an API to blob storage that I have provided as if it were a file system (up to 58 identical calls per file). Clearly this is not ideal. Using default HTTP style caching is a behavior I would like as it would cause my application to only download the file when it’s modified.

The issue seems to occur every other request (e.g. it appears to be happening when the request is cached and the server is checking to see if the server content has changed).

The only difference between the requests that fail and the requests that succeed seems to be the inclusion of:

If-None-Match: "<a blob etag>"
If-Modified-Since: <a date>

I’ve looked at the code for the .net API (which I’m using) on github for 1.7.1 and assuming it hasn’t changed from SDK 1.6 (what I’m currently using), it should work fine.

Any help is very appreciated

UPDATE:
I’ve written some repro code to assist:

Uses: .NET 4.0, Windows Azure SDK 1.6

using System;
using System.Net;
using System.Net.Cache;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureStorageProb
{
    class Program
    {
        static void Main(string[] args)
        {
            const string accountKey = "<azure storage account key>";
            const string account = "<azure storage account name>";
            const string testBlob = "<blob path to test file>";
            var cloudStorageAccount = 
               new CloudStorageAccount(
                  new StorageCredentialsAccountAndKey(account, accountKey),
                  useHttps: true);
            var cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();
            HttpWebRequest.DefaultCachePolicy = 
               new HttpRequestCachePolicy(HttpRequestCacheLevel.Default);

            try
            {
                var blob = cloudBlobClient.GetBlobReference(testBlob);
                blob.FetchAttributes();
                blob.DownloadByteArray();
                Console.WriteLine("First attempt worked!");
            }
            catch (StorageClientException ex)
            {
                Console.WriteLine(ex);
            }

            try
            {
                var blob = cloudBlobClient.GetBlobReference(testBlob);
                blob.FetchAttributes();
                blob.DownloadByteArray();
                Console.WriteLine("Second attempt worked!");
            }
            catch (StorageClientException ex)
            {
                Console.WriteLine(ex);
            }
            Console.ReadKey();
        }
    }
}
  • 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-14T10:00:46+00:00Added an answer on June 14, 2026 at 10:00 am

    So it turns out the culprit is BlobRequest.SignRequest(request, creds); A quick peek at the documentation indicates that the If-None-Match and If-Modified-Since are both used as part of the calculation for the Authentication header that call adds. Because those headers are added AFTER the Authentication header is computed by WINInet (a presumption). Either way the end result is that the checksum provided by the Authentication header is now invalid. Thus causing the 403 Forbidden.

    Work Arounds:

    • Manually cache items locally
    • Fix the Calling code (probably the best long term solution)
    • Use the rest interface VERY carefully (experimentation has shown this to be dangerous for the same reasons, using the ‘Shared Key Lite’ gets around this in some circumstances)
    • Use a regular WebRequest to get files (this means you have to expose them to the internet, either via shared key or otherwise)

    I’m not going to say that Azure Blob Storage is broken… but I will say that it is not truly RESTful as it cannot comply with HTTP semantics correctly.

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

Sidebar

Related Questions

I seem to be getting the above error when trying to make a callable
I seem to be getting back a well-formed XML document from this cURL, but
I seem to be getting this error... I believe I am typing everything correctly:
I seem to be getting a Caught NoReverseMatch error. I am not so sure
I seem to be getting application crashes at: parent.findViewById(R.id.a_1).setVisibility(View.VISIBLE); not sure what im doing
I'm getting these errors [http://pastebin.com/BEgNh2mm][chef-client/server errors] after successfully bootstrapping a node with chef. The
I seem to be getting this particular always when i am trying to receive
I've been coding for a while now but seem to be getting this issue
Spent a good few hours on this now and don't seem to be getting
I've added # config/initializers/will_paginate_array_fix.rb require 'will_paginate/array' but still do not seem to be getting

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.