当我尝试使用 AWS 页面中的以下示例代码扫描 dynamoDb 表并返回特定列时:
string tableName = "Thread";
Table ThreadTable = Table.LoadTable(client, tableName);
ScanFilter scanFilter = new ScanFilter();
scanFilter.AddCondition("ForumId", ScanOperator.Equal, forumId);
scanFilter.AddCondition("Tags", ScanOperator.Contains, "sortkey");
ScanOperationConfig config = new ScanOperationConfig()
{
AttributesToGet = new List<string> { "Subject", "Message" } ,
Filter = scanFilter
};
Search search = ThreadTable.Scan(config);
Run Code Online (Sandbox Code Playgroud)
我收到以下异常:
消息:Amazon.DynamoDBv2.AmazonDynamoDBException:在选择获取 ALL_ATTRIBUTES 时无法指定 AttributesToGet ---- Amazon.Runtime.Internal.HttpErrorResponseException:抛出了“Amazon.Runtime.Internal.HttpErrorResponseException”类型的异常。
我该如何解决?
我正在关注这个教程:
它描述了用户单击按钮然后调用没有属性的函数的情况。
但是,当添加具有 HttpPost 属性的函数时,会调用该函数,而不是不调用不带该属性的函数。
该按钮启动 Html.BeginForm(),它创建一个 post 请求。那么为什么没有该属性的函数会被调用呢?