Reputation: 2263
I wrote a unit test that creates a container, adds a file, checks to see if the file exists, and then attempts to delete the file. When I get to the deletion step, I always get a 503 Service Unavailable though when I step through the unit test and look in the container, the file has been deleted (I have verified that it has been created as well). Any idea what I am doing wrong? I am using "Microsoft.WindowsAzure.Storage.dll" version 2.0.5.1 that I got from NuGet.
The same thing occurs when I try and delete the container.
Here is the the code I'm using. Seems pretty straight forward.
public void Save(string relativePath, Stream item)
{
var cr = GetContainer(relativePath).GetBlockBlobReference(GetPath(relativePath));
item.Seek(0, SeekOrigin.Begin);
cr.UploadFromStream(item);
}
public void Delete(string relativePath)
{
var cr = GetContainer(relativePath).GetBlockBlobReference(GetPath(relativePath));
cr.DeleteIfExists();
}
Upvotes: 0
Views: 362
Reputation: 5883
The OP wrote:
In my case, this turned out to be related to our IT department's network monitoring solution blocking DELETE statements thinking that they were WebDav requests. Hope this helps someone in the future.
Upvotes: 1