Search code examples
wcfservicenettcpbinding

request timed out for WCF service using nettcpbinding


I am new to WCF services, i have created a sample WCF service, where i have Hosted WCF Service with netTcpBinding in Windows Service.(since i want this WCF service to run as windows service)

Its a simple service which adds/deletes/loads employee details, and is consumed by a windows forms application.i don't know why, only 10 requests are responded, no matter what you do.The 11th request gives an error "request timed-out"

i know that increasing the time-out time wont help, it would just make me wait longer for that error. i also know that my server(currently-local pc) is not responding for the 11th request, but don't know the reason.

Is there any setting for number of request/responses per minute for server? might sound funny, but i have no idea.

More useful info on the issue:

  • Can't change the binding other than nettcp (system requirement)
  • Logged in as Admin
  • Firewall disabled

Solution

  • It sounds like the connections aren't being closed - the default limit for WCF connections is 10, so the 11th won't work.

    It might be that you're not explicitly closing them see here:

    Hope this helps.