Answer the question
In order to leave comments, you need to log in
Why does a request hang between WCF services?
Hey!
There was a messaging problem between two WCF services.
One service sends a "long" request, and if the request time exceeds 260 seconds, it hangs. The amount of data transferred is minimal (less than 1kb), the type of request is not important (tried POST and GET)
This problem only occurs if the service that calls the request from another service is running on IIS 7.5. IIS 7.0 does not have this problem.
The code of the method being called.
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
public GA_Output GA_Calc_GET(string id)
{
GA_Output dtr_obj = new GA_Output();
try
{
WebOperationContext.Current.OutgoingResponse.Headers.Add("Access-Control-Allow-Origin", "*");
Thread.Sleep(300000);
}
catch (Exception ex)
{
dtr_obj.ErrorResponse.SetError(ex);
}
return dtr_obj;
}
Answer the question
In order to leave comments, you need to log in
The request takes more than 260 seconds, perhaps the system architecture should be reviewed, it is better to execute such requests asynchronously and take the result later. But in fact, in my experience, in order to minimize the number of "glitches" of IIS itself, it is better that the versions on both servers match, then it may not matter which version fails.
it is better that the versions on both servers match
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question