The issue has been resolved. The problem was caused by adding an await operation, which caused the task to be canceled.
Here is the line of code : var response = _httpClient.PutAsync(requestUrl, content);
var response = _httpClient.PutAsync(requestUrl, content);