Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#windows phone 8应用程序azure表存储错误_C#_.net_Json_Azure_Windows Phone 8 - Fatal编程技术网

c#windows phone 8应用程序azure表存储错误

c#windows phone 8应用程序azure表存储错误,c#,.net,json,azure,windows-phone-8,C#,.net,Json,Azure,Windows Phone 8,到今天为止,我的应用程序一直运行良好!我正在查询我的azure表存储(通过azure存储nuget),现在通过我的应用程序进行调试,我得到一个错误: {Microsoft.WindowsAzure.Storage.StorageException:从JSON读取器读取时发现意外的“EndOfInput”节点。应为“StartObject”节点-->Microsoft.Data.OData.ODataException:从JSON读取器读取时发现意外的“EndOfInput”节点。应为“Start

到今天为止,我的应用程序一直运行良好!我正在查询我的azure表存储(通过azure存储nuget),现在通过我的应用程序进行调试,我得到一个错误:

{Microsoft.WindowsAzure.Storage.StorageException:从JSON读取器读取时发现意外的“EndOfInput”节点。应为“StartObject”节点-->Microsoft.Data.OData.ODataException:从JSON读取器读取时发现意外的“EndOfInput”节点。应为“StartObject”节点。 位于Microsoft.Data.OData.Json.JsonReaderExtensions.ValidateNodeType(JsonReader JsonReader,JsonNodeType expectedNodeType) 位于Microsoft.Data.OData.Json.JsonReaderExtensions.ReadNext(JsonReader-JsonReader,JsonNodeType-expectedNodeType) 位于Microsoft.Data.OData.Json.JsonReaderExtensions.ReadStartObject(JsonReader JsonReader) 在Microsoft.Data.OData.JsonLight.ODataJsonLightDeserializer.ReadPayloadStartImplementation(ODataPayloadKind payloadKind、DuplicatePropertyNamesChecker DuplicatePropertyNamesChecker、Boolean isReadingNestedPayload、Boolean allowEmptyPayload) 在Microsoft.Data.OData.JsonLight.ODataJsonLightDeserializer.ReadPayloadStart(ODataPayloadKind payloadKind,DuplicatePropertyNamesChecker DuplicatePropertyNamesChecker,Boolean isReadingNestedPayload,Boolean allowEmptyPayload) 位于Microsoft.Data.OData.JsonLight.ODataJsonLightReader.ReadAtStartImplementation()上 在Microsoft.Data.OData.ODataReaderCore.ReadImplementation()上 在Microsoft.Data.OData.ODataReaderCore.ReadSynchronously()上 在Microsoft.Data.OData.ODataReaderCore.InterceptException[T](Func
1操作)
在Microsoft.Data.OData.ODataReaderCore.Read()上
在Microsoft.WindowsAzure.Storage.Table.Protocol.TableOperationHttpResponseParsers.TableQueryPostProcessGeneric[TElement,TQueryType](流响应流,Func
6解析程序,HttpWebResponse响应,TableRequestOptions选项,OperationContext ctx,String accountName) 在Microsoft.WindowsAzure.Storage.Table.TableQuery
1.c\u DisplayClass10
2.b\u f(RESTCommand
1 cmd,HttpWebResponse resp,OperationContext ctx)
位于Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ProcessEndOfRequest[T](ExecutionState
1 ExecutionState) 位于Microsoft.WindowsAzure.Storage.Core.Executor.Executor.OnOperation[T](ExecutionState
1 ExecutionState)
---内部异常堆栈跟踪的结束---
在Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult结果)
位于Microsoft.WindowsAzure.Storage.Table.CloudTable.EndExecuteQuerySegmented[TResult](IAsyncResult asyncResult)
在Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.c_uuDisplayClass1上
1.b_u0(IAsyncResult ar) ---来自引发异常的上一个位置的堆栈结束跟踪--- 请求信息 请求ID:f08895a8-0002-0048-6252-E64400000 请求日期:2015年9月3日星期四14:08:46 GMT 状态信息:OK }

有趣的是,我用相同的代码创建了一个控制台应用程序(甚至使用了异步方法),它工作得很好,但只要我在手机上调试(而不是在模拟器上),我就会得到那个错误。我甚至将我所有的nuget软件包更新到了最新版本,但没有任何乐趣

下面是我的查询格式,就像我说的,这在控制台应用程序中有效,但奇怪的是在我的windows phone(8)应用程序项目中停止了

var tbData= tableClient.GetTableReference("MyTable");
string pkFilter =  TableQuery.GenerateFilterCondition("PartitionKey",QueryComparisons.Equal, "MyKey");
TableQuery<MyClass> query = new TableQuery<MyClass>().Where(pkFilter);
var ptb = await tbData.ExecuteQuerySegmentedAsync(query, null);
var-tbData=tableClient.GetTableReference(“MyTable”);
字符串pkFilter=TableQuery.GenerateFilterCondition(“PartitionKey”,QueryComparisons.Equal,“MyKey”);
TableQuery query=new TableQuery()。其中(pkFilter);
var ptb=wait tbData.ExecuteQuerySegmentedAsync(查询,空);

看起来数据没有完全加载。你能试着获取较少数量的记录,比如10或100条而不是1000条吗?嗨@GauravMantri,我试图获取的记录没有那么多..即30条..相同的代码在控制台应用程序中效果很好,但在windows phone应用程序中效果不好?