I have an asp.net app that calls a WCF service. I've been having intermittent timeouts for a while so I decided to create a trace log. After getting a timeout I found the message below in the log file:
The system hit the limit set for throttle 'MaxConcurrentSessions'. Limit for this throttle was set to 10. Throttle value can be changed by modifying attribute 'maxConcurrentSessions' in serviceThrottle element or by modifying 'MaxConcurrentSessions' property on behavior ServiceThrottlingBehavior.
The thing is though I'm closing the client connection each time so I don't understand why the concurrent sessions are adding up. Below is a typical call that I make:
try
{
//create proxy
client = new CAEServiceContractClient();
response = client.GetSecurityRecords(item);
totalRecords = response.TotalRecords;
securityListView.DataSource = response.SecurityItemColl;
securityListView.DataBind();
// Always close the client.
client.Close();
success = true;
}
finally
{
if (!success)
{
client.Abort();
}
}
So my question is, why isn't the session being destroyed once I execute client.Close()?
TIA.