无法更新Azure Portal中的CosmosDB存储过程

无法更新Azure Portal中的CosmosDB存储过程,azure,azure-cosmosdb,Azure,Azure Cosmosdb,从宇宙数据库开始。我正试图在Azure portal data Explorer中为我的CosmosDB数据编写一个存储过程。我可以创建一个新的存储过程并执行它,但无法保存对该过程的任何更改。尝试时,我收到以下错误消息: Error while updating stored procedure testSP: ... Create, update, or delete scripts in direct mode in collections with multiple partitions

从宇宙数据库开始。我正试图在Azure portal data Explorer中为我的CosmosDB数据编写一个存储过程。我可以创建一个新的存储过程并执行它,但无法保存对该过程的任何更改。尝试时,我收到以下错误消息:

Error while updating stored procedure testSP:
...
Create, update, or delete scripts in direct mode in collections with multiple partitions is not allowed.
不知道直接模式是什么意思。我该如何解决这一问题?

您可以尝试使用ReplaceStoredProcedureAsync吗


相关的

是的,我可以也将尝试。虽然目前我正在门户中使用Data Explorer,并希望我可以在那里开发一个简单的存储过程,而不使用.NET API。开发CosmosDB存储过程的推荐方法是什么?我应该使用Visual Studio代码吗?这是一个临时错误,发生在以前未分区的集合上,对此的修复程序即将发布。同时,建议的使用SDK的解决方案也会起作用。
try 
{
    await _client.CreateStoredProcedureAsync(...);
} 
catch(DocumentClientException dex) when (dex.StatusCode == HttpStatusCode.Conflict) 
{ 
    await _client.ReplaceStoredProcedureAsync(...);  
}