小编Ron*_*ger的帖子

如何解决此异常:“选择获取 ALL_ATTRIBUTES 时无法指定 AttributesToGet”?

当我尝试使用 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”类型的异常。

我该如何解决?

amazon-dynamodb

4
推荐指数
1
解决办法
1019
查看次数

为什么即使请求是 post 请求,在 ASP.NET MVC 中也会调用没有属性的函数?

我正在关注这个教程:

http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/examining-the-edit-methods-and-edit-view

它描述了用户单击按钮然后调用没有属性的函数的情况。

但是,当添加具有 HttpPost 属性的函数时,会调用该函数,而不是不调用不带该属性的函数。

该按钮启动 Html.BeginForm(),它创建一个 post 请求。那么为什么没有该属性的函数会被调用呢?

asp.net-mvc

0
推荐指数
1
解决办法
2850
查看次数

标签 统计

amazon-dynamodb ×1

asp.net-mvc ×1