Below is the API that times out. The API is deployed in Azure. The below api executes without any issues on local environment IIS 10.0, The execution fails to enter controller. Why does it timeout on Azure? And how do I stop the request from timing out.
[Route("count")]
[HttpPost]
public async Task<IHttpActionResult> PostStockCountAsync(CreateStockCountRequest request)
{
var query = Map<CreateStockCountRequest, CreateStockCountCommand>(request);
var stocks = await SendAsync(query);
return Ok(stocks);
}
Request Object. The items collection contains 241 items. The size is nearly 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; }
}
It did not work Even after adding the below config entry.
<httpRuntime targetFramework="4.5.2" maxRequestLength="102400" />
The Deserialization is not happening.
500 - The request timed out.
The web server failed to respond within the specified time. – sham May 30 '18 at 14:05