Thursday, October 18, 2007

useDefaultWebProxy causing problems when calling the WCF service

Problem:
When my web application was running we would occassionally get timeouts when the client tried to contact the service. Resetting IIS would solve the problem, but obviously that is not a desired solution.

Solution:
Set useDefaultWebProxy=false from httpTransport element of the app.config or web.config. For some reason, when this setting was set to true the client would have problems sending requests that were executed rapidly in succession. This would cause a problem in the UI when two independent users sent requests near the same time.

No comments: