1
私はasp.net Webサイトからdocumentdbに接続しようとしましたが、このエラーが発生しています。指定されたIDのDocumentDBエンティティはシステムに存在しません
protected async void Page_Load(object sender, EventArgs e)
{
Response.Write("Page Load<br/>");
await GetData();
}
public async Task GetData()
{
try
{
Response.Write("<br/> Get Data function Start<br/><br/>");
using (var client = new DocumentClient(new Uri(ConfigurationManager.AppSettings["endpoint"]), ConfigurationManager.AppSettings["authKey"]))
{
//await client.OpenAsync();
RequestOptions reqOpt = new RequestOptions { PartitionKey = new PartitionKey(209) };
var parameters = new dynamic[] { 1 };
StoredProcedureResponse<object> result = await client.ExecuteStoredProcedureAsync<object>(
UriFactory.CreateStoredProcedureUri(ConfigurationManager.AppSettings["database"], ConfigurationManager.AppSettings["pcsd"], "GetMemberbyId"), reqOpt, parameters);
Response.Write(result.Response.ToString());
}
Response.Write("<br/><br/> Get Data function End");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
後ろASPXコードで次のように指定されたIDを持つエンティティがシステムに
コードは存在しない:指定されたIDを持つエンティティがシステムに
DocumentClientException存在しない
以下のストアドプロシージャ
私はlocalhostで0
それが正常に働いていますが、ウェブサイトでは、紺碧のWebアプリケーションに公開され、私はエラー
私のlocalhostではうまくいきますが、私はazure Webアプリケーションのみを公開していますが、そのエラーが発生しています。 –
ストアドプロシージャはlocalhost上にのみ存在するのですか、それともazureにも公開されていますか? – MiddleTommy
ConfigurationManager.AppSettings ["pcsd"]はAzureで正しいコレクションを返していますか? – MiddleTommy