I have WebAPI. It takes data from request and tries to create/update records in db. In result it should show what records is successfully created/update and which are partially successful (created/updated but not all data because of some reason that should be returned also).
Locally it works fine. But when I deployed it on test server, request not receiving any response. I am doing tests with Postman. It is always saying "Sending request...".
I've added everywhere try-catch block, logs etc. From logs I can say that everything is saved in db. None exception is catch.
What can be the reason of such behavior?
I run SQL Profiler to check if none deadlock happened. Result - no deadlock in db. Only strange thing - it is Window Full together with ZeroWindowProbe detected by Wireshark. But don't think it is a reason.
Schematic algo of API:
WebApi Action -> Command -> Command Handler -> TransactionScope -> work with incoming data -> save changes -> commit transaction -> return response.
After adding more logs - seems like issue with Action.
[HttpPost]
[Route("api/integration/post")]
public async Task<IHttpActionResult> Upload([FromBody] IntegrationRequestBody body)
{
var users = body.Data.Select(d => d.ToObject<UserImportModel>()).ToList();
var response = await this.IntegrateUser(body.Date, users).ConfigureAwait(false);
this._logger.Error("Some response here");
return response;
}
At logs I see record "Some response here", but in Postman it is still "Sending request...". It isn't reproduced all time. But I don't know what is a cause of it.