0

I have one WCF service hosted in IIS 7.5. We observed that when we are making the first cal to the WCF service it is very slow. Taking almost 10 to 13 secs time to reach to WCF service. When turn on the tracing in the server we observed that it is taking time while creating the servicehost and open it. Please note we have done IIS level setting of StartupMode as AlwaysRunning but no luck so far. Due to this we are getting timeout exception for the first time as the client expecting the call to be finished within 6 secs. Second call onwards it is very fast as it is using the existing ServiceHost. Please let me know if by anyway we can reduce this time.

  • Are you using an IoC container with a singleton configuration? If so, it could be that it takes time to instantiate everything for the first time. I would definitely recommend using dotTrace (not free, unfortunately, but you can see a lot of performance details) or a similar tool for something like this - https://stackoverflow.com/questions/3927/what-are-some-good-net-profilers – Venom Sep 01 '18 at 18:30
  • It is nothing to do with dependency injection. Call not even reaching to WCF service it is taking almost 9 secs. Issue is not with our code. It is the channel creation taking time. We tried dotTrace but with no luck as seems WCF channel creation is taking time. – Rajib Halder Sep 02 '18 at 03:55
  • Are you using a secure binding and set `establishSecurityContext='true'`? – mahlatse Sep 04 '18 at 13:20
  • No. We are not. – Rajib Halder Sep 04 '18 at 17:59

0 Answers0