question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DELETE requests fail on Mono env

See original GitHub issue

I am using client v3.0.3.0 on Mac OS X with Mono. All DELETE requests (delete container, CloudBlockBlob.Delete, CloudPageBlob.Delete) are failing with HTTP 403 Forbidden:

Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.. —> System.Exception: The remote server returned an error: (403) Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature… at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x0030c] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System/System.Net/HttpWebRequest.cs:1606

Seems like a signing issue. Repro is rather easy:

var account = new CloudStorageAccount (new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials (STORAGE_ACCT, STORAGE_KEY), true);
var client = account.CreateCloudBlobClient ();
var container = client.GetContainerReference (Guid.NewGuid().ToString());
container.Delete (); // throws exception

It was also the same on v3.0.2.x, I just upgraded today to see if it’s a known issue. Same version works fine on Windows. And please note, it’s just DELETE operations, all others work fine.

Here’s a dump of RequestEventArgs.Request.Header.ToString() caught in OperationContext.ResponseReceived event on both platforms,

OS X:

{User-Agent: WA-Storage/3.0.3 (.NET CLR 4.0.30319.17020; Unix 13.0.0.0)
x-ms-version: 2013-08-15
x-ms-client-request-id: b90b3f36-1f88-4150-a71c-20f1502a8e96
x-ms-date: Wed, 12 Feb 2014 06:27:20 GMT
Authorization: SharedKey f00f00f00:x+0U7Z9ggFl3MHuYfvrOR3wgieFLhQr/5j+sjaSxBnc=
Content-Length: 0
Connection: keep-alive
Host: f00f00f00.blob.core.windows.net

}

Windows:

{User-Agent: WA-Storage/3.0.3 (.NET CLR 4.0.30319.34003; Win32NT 6.2.9200.0)
x-ms-version: 2013-08-15
x-ms-client-request-id: e34b16cc-2921-4493-888c-307994d532d5
x-ms-date: Wed, 12 Feb 2014 06:29:47 GMT
Authorization: SharedKey f00f00f00:I9Gd72nFal6v8IPOYigOQsiJCYq90/VkDTLEsWGYWR8=
Host: f00f00f00.blob.core.windows.net
Connection: Keep-Alive

}

The only difference I see is Content-Length: 0 added on Windows probably while sending the request. I’ll try to see if it is missing while signing. I’ll be investigating a bit.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akorchemniycommented, Oct 19, 2014

I ran into the same error when attempting to run: table.CreateIfNotExists();

Turned out that my system time was off by a few hours.

0reactions
ahmetbcommented, Mar 4, 2014

Fixed in Mono per request. https://bugzilla.xamarin.com/show_bug.cgi?id=17736 hoping to get and try soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling and returning Mono error in correct way - Java ...
I have to provide an update and delete feature through API. I have written the following code to delete the record: public Mono<String>...
Read more >
Getting Started with Spring WebFlux
Most traditional applications deal with blocking calls or, ... monoEmpty = Mono.empty(); Mono<Object> monoError = Mono.error(new ...
Read more >
Reactor 3 Reference Guide
A Mono<T> is a specialized Publisher<T> that emits at most one item via the onNext signal then terminates with an onComplete signal (successful ......
Read more >
AWS S3 with Java - Reactive Support
Asynchronous methods in the SDK V2 always return a CompletableFuture object. We take it and adapt it to a Mono using its fromFuture()...
Read more >
Handling Exceptions Returned from the Web API
A 404 error is generated by a Web server when a user requests a page, or other resource, that is not valid on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found