Wednesday, January 15, 2014

WCF Service Response Time Slow?

Recently ran into an issue testing a WCF web service deployed on a server.  A call to a very light service was taking upwards of 15 seconds to return a response.

The service had logging which revealed the call into the service until a response was returned was a fraction of a second.

I decided to do a Fiddler2 trace against a test program to see what was happening and suddenly the service was returning nearly instantly.  I continued to test and everything looked fine.  I then closed Fiddler2 and then the slow response time returned!

What I ultimately discovered was Fiddler was un-checking the "Automatically Detect Settings" on the Internet Options.  This can be found under Control Panel\Network and Internet\Internet Options\Connections\LAN Settings.  That setting was apparently set as part of the configuration of my work machine.  So that was what was causing the slowness.

I later recalled you can fix this in your WCF bindings by setting useDefaultWebProxy to "false" which ignores this setting.


No comments:

Post a Comment