List all azure tables in a storage account -
i trying list azure tables , iterate on them delete each table. here first list of cloud tables , trying iterate on cloud tables. gives me exception on lopping on it.
code follows
cloudstorageaccount account = cloudstorageaccount.parse(connectionstring); cloudtableclient tableclient; ienumerable<cloudtable> tables = tableclient.listtables(); foreach (cloudtable table in tables) table.deleteifexists(); at loop breaks , not allows iterate. below exception details.
at microsoft.windowsazure.storage.core.executor.executor.executesync[t](storagecommandbase
1 cmd, iretrypolicy policy, operationcontext operationcontext) @ microsoft.windowsazure.storage.table.tablequery1.executequerysegmented(tablecontinuationtoken token, cloudtableclient client, string tablename, tablerequestoptions requestoptions, operationcontext operationcontext) @ microsoft.windowsazure.storage.table.tablequery1.<>c__displayclass7.<execute>b__6(icontinuationtoken continuationtoken) @ microsoft.windowsazure.storage.core.util.commonutility.<lazyenumerable>d__01.movenext() @ system.linq.enumerable.whereselectenumerableiterator`2.movenext() @ cleanstorageaccount.program.main(string[] args) in c:\users\vargup\documents\visual studio 2013\projects\cleanstorageaccount\cleanstorageaccount\program.cs:line 34 @ system.appdomain._nexecuteassembly(runtimeassembly assembly, string[] args) @ system.appdomain.executeassembly(string assemblyfile, evidence assemblysecurity, string[] args) @ microsoft.visualstudio.hostingprocess.hostproc.runusersassembly() @ system.threading.threadhelper.threadstart_context(object state) @ system.threading.executioncontext.runinternal(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state) @ system.threading.threadhelper.threadstart()
i updated microsoft.windowsazure.storage.dll reference 2.1 3.1 version , same code worked me.
Comments
Post a Comment