1

I am sending JSON data to Web api. Everything works locally with IISExpress. However, there is an issue with remote server which has IIS 8 installed. I got no response when request payload reaches some value. I mean that the response is in pending status (no empty response, no errors). Limits varies a bit for different controllers/functions, but still is pretty low. They are around 2.5-3.5 kb. It feels like concrete controller's method is not hit at all in such cases (to check this, I put return statement right in the beginning of the method like following).

[HttpPost]
public async Task<IHttpActionResult> UpdateCity(int id, CityDto cityDto)
{
   return StatusCode(HttpStatusCode.NoContent);
}

I tried to set request limits as mentioned here https://stackoverflow.com/a/3853785/3507404 without luck. My set up:

1) Amazon EC2

2) Windows Server 2012 r2

3) IIS 8

4) Net 4.5

I do not see any related info in IIS logs.

How can I debug this issue? Is there any other limits that I should set? Can it be related to Amazon EC2?

Community
  • 1
  • 1
Ingweland
  • 1,073
  • 1
  • 13
  • 25

2 Answers2

0

Sounds like a deadlock issue. Your method is marked as async but you aren't awaiting anything. Either remove the async Task, await something, or remove async and return Task.FromResult(new StatusCode(HttpStatusCode.NoContent));

Give this a try and let me know. This would explain the random failure times as the deadlock would only occur under certain situations.

ManOVision
  • 1,853
  • 1
  • 12
  • 14
-1

It happened that this issues was not related to either IIS or Asp.net. This was either my internet provider or wi-fi router which caused it (or both). It looks like some POST requests (at least POST, did not check with others) never reached my remote server at all when I was using the router (D-link Dir-625). However, it may not be just because of the router. I suspect that this is some configuration on my internet provider side which does not work well with my router.

Ingweland
  • 1,073
  • 1
  • 13
  • 25