Hi @daniel061974 ,
When I was learning about WCF, I saw some examples of improving WCF.
1.Set ServiceHost on the server to break the maximum number of requests that the ServerHost can receive, such as:
host.Description.Behaviors.Add(new ServiceThrottlingBehavior()
{
MaxConcurrentInstances = 2000,
MaxConcurrentCalls = 2000,
MaxConcurrentSessions = 2000
});
2. Set the InstanceContextMode and ConcurrencyMode characteristics of the service by using the following features on the class that implements the service contract:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Multiple,
UseSynchronizationContext=false)]
public class MyService : IInterface{}
3: Set useDefaultWebProxy="false" in APP.config
<bindings>
<basicHttpBinding>
<binding name="" useDefaultWebProxy="false" />
</basicHttpBinding>
</bindings>
Best Regards
Qi You
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.