I have a WCF running service with throttling values as
The way I understood the counters is that Concurrent calls govern the number of requests currently being executed, Concurrent sessions govern the number of requests in wait queue and concurrent instances is the sum of both.
We have a scenario, where the Percent of concurrent calls are going > 100 but the percent of concurrent session is always 0.
I am deeply confused about the meaning of these counters and the values I am getting.
Any Help, is appreciated
Three points to check in order to have a session
1 Use a session enabled binding
For instance, check that you aren't using basicHttpBinding
for instance. That binding doesn't support sessions.
Prefer wsHttpBinding
or netTcpBinding
or namedPipeBinding
2 Enable session on the service implementation
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class BillingService { ... }
3 Allow or requires the session on the service interface
[ServiceContract(SessionMode=SessionMode.Allowed)]
public interface IBillingService { … }
You can check if there is a current session :
1 Server side
string sessionId = OperationContext.Current.SessionId;
2 Client side
string sessionId = proxy.InnerChannel.SessionId;
Regards
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.