Azure tables exclusion information

Searching for Azure table storage debugging is incredibly frustrating. Until I find out about the various limitations, trying to find the reason for the incredibly informative DataServiceQueryException with the InvalidInput code is hard to say.

After searching the Internet multiple times, the http://blogs.msdn.com/b/partlycloudy/archive/2009/12/16/development-storage-logging.aspx message shows how to enable logging. This populates the error log file with much more useful information. It is probably not recommended to leave this log permanently, and every time I have a problem, checking this file is not an ideal situation.

There are many reports about using Fiddler to view actual requests and responses, but I cannot get this to work properly. I set the connection string to connect through the Fiddler proxy (I had to manually add the hostname ipv4.fiddler to the hosts file, otherwise it would not be allowed - Fiddler should do something automatically). I see connections for deployment, but not connections for any requests. I tried to run Fiddler as an administrator, but still getting the same results.

Why is it so hard? Am I missing something? Is it possible to return the exception information that is logged in the error log file, and not the InvalidInput exception messages for garbage? Any ideas why Fiddler is not playing the game?

+3
4

, , , . , LINQ (, , ..) ( ). , , . - , .Select() .Where(), , .

. , . , , , , :

void Main()
{
    var acct = CloudStorageAccount.DevelopmentStorageAccount;

    var client = acct.CreateCloudTableClient();
    var ctx = client.GetDataServiceContext();
    ctx.IgnoreMissingProperties = true;

    var table = "tl36f6e92d94954f168ade0be6a547c0ce";

    //build query
    var q = ctx.CreateQuery<Foo>(table)
        .Where(e => e.RowKey.CompareTo(2) < 0) //this query fails
        .Take(10);

    //Dump URI to inspect
    ((DataServiceQuery)q).RequestUri.Dump();

    //dump results
    q.Dump();
}


[System.Data.Services.Common.DataServiceKey("PartitionKey", "RowKey")]
class Foo
{
    public string PartitionKey { get; set; }
    public string RowKey { get; set; }
    public string Whatever { get; set; }
}

LINQPad ( -) URI. , , , . , , , . , .

+5

"ipv4.fiddler" hosts, , Fiddler, -, . , "ipv4.fiddler" . DNS, , ...

Fiddler, - WinINET 127.0.0.1:8888. , Dev Fabric IIS NETWORK SERVICE, WinINET Fiddler , , HTTP- Fiddler. Azure DNS: "UseDevelopmentStorage = true; DevelopmentStorageProxyUri = http://ipv4.fiddler" .

VS:

bitsadmin/util/SETIEPROXY NETWORKSERVICE MANUAL_PROXY 127.0.0.1:8888 NULL

NETWORK SERVICE Fiddler -, ipv4.fiddler localhost HTTP- dev .

+4

2 , , - ... NULL- POCO, - , :

_repository.Find(f => f.PartitionKey == request.CompanyPartitionKey() && f.MyNullGuid == null);

, , , NULL, ... "Invalid Input" , , - , Table Storage , .

: null guid Guid.Empty... Ugh...

0

Azure StorageException, , Azure (, Blob, Queue,...)

https://www.nuget.org/packages/AzureStorageExceptionParser/

:

Try

{

// Azure (Blob, Table, Queue,..)

}

catch (StorageException storageException)

{

// GetHttpStatusCode HttpStatusCode, StorageException

Int? httpStatusCode = storageException.GetHttpStatusCode();

// GetFailedOperationIndex Azure Table

int failedOperationIndex = storageException.GetFailedOperationIndex();

}

0
source

Source: https://habr.com/ru/post/1765542/


All Articles