2016-12-13 4 views
1

作業を停止しました。私の最後の何も変わっていないので、本当に奇妙であるDocumentDb CreateDocumentQueryは、私は、このメソッドを持っている

Partition routing information cannot be extracted from the query when running in a 32-bit process. To complete your query and avoid this exception, ensure that your host process is 64-bit.\r\nFor Executable applications, this can be done by unchecking the \"Prefer 32-bit\" option in the project properties window, on the Build tab. \r\nFor VSTest based test projects, this can be done by selecting Test->Test Settings->Default Processor Architecture as X64, from Visual Studio Test menu option.\r\nFor locally deployed ASP.NET Web applications, this can be done by checking the \"Use the 64 bit version of IIS Express for web sites and projects\", under Tools->Options->Projects and Solutions->Web Projects.\r\n

: は、今ではエラーがスローされます。 私はそれが言ったすべてをやってみたが、役に立たなかった、それでもエラーがある。 誰にも分かりますか?

+0

ホストプロセスを64ビットに変更しようとしましたか? – Saadi

+0

ええ、それは動作しますが、なぜこれが変更されましたか?これは先日正常に動作していた – r3plica

+0

誰か他の人が変更したり、マシン構成が変更されている可能性があります。 :) – Saadi

答えて

2

このエラーメッセージについての情報は、hereです。

DocumentDbでパーティションルーティング機能を使用しない場合は、FeedOptionsEnableCrossPartitionQueryを無効にするようにコードを変更することができます。

/// <summary> 
/// Gets a list of our documents 
/// </summary> 
/// <returns></returns> 
public List<T> List(string query) 
{ 
    // Return our items 
    return 
     this 
      ._client 
      .CreateDocumentQuery<T>(
       UriFactory.CreateDocumentCollectionUri(this._databaseName, this._collectionName), 
       query, 
       new FeedOptions { EnableCrossPartitionQuery = false }; 
     ).ToList(); 
} 
+0

それは私のために働いていません。まだAzure DocumentDBを使用してこのエラーが発生しています。 – menth0l

関連する問題