Azure Web API应用程序请求超时问题

时间:2018-05-30 13:18:28

标签: azure asp.net-web-api azure-web-sites azure-web-app-service

以下是超时的API。 API部署在Azure中。下面的api在本地环境IIS 10.0上执行没有任何问题,执行无法进入控制器。 为什么在Azure上超时?如何阻止请求超时。

            [Route("count")]
            [HttpPost]
            public async Task<IHttpActionResult> PostStockCountAsync(CreateStockCountRequest request)
            {
                var query = Map<CreateStockCountRequest, CreateStockCountCommand>(request);

                var stocks = await SendAsync(query);

                return Ok(stocks);
            }

请求对象。 items集合包含241个项目。大小近41kb

public class CreateStockCountRequest
    {
        public Guid Id { get; set; }
        public IList<StockCountItem> Items { get; set; }
        public Guid OutletId { get; set; }
    }

public class StockCountItem
    {
        public Guid ProductId { get; set; }
        public string ProductName { get; set; }
        public decimal CurrentAmountSystem { get; set; }
        public Decimal AverageCostPrice { get; set; }
        public decimal CurrentAmountActual { get; set; }
        public bool Checked { get; set; }
        public Guid InventoryId { get; set; }

        public DateTime? CountedOn { get; set; }
    }

即使在添加以下配置条目后也无效。

<httpRuntime targetFramework="4.5.2" maxRequestLength="102400" /> 

反序列化没有发生。

0 个答案:

没有答案
相关问题