Sunday, April 4, 2010

Wcf first connection is slow

@YaronNaveh

You may have experienced the first connection from a Wcf client to a service to be extremely slow. In some cases this is expected as the first connection establishes a session which may require exchange of multiple messages. However in some cases there is no obvious reason for that.

One cause may be a slow http proxy. By default, Wcf uses the default http proxy configured in internet explorer. The proxy may be specified directly or in form of a configuration script:





If this is the cause of the slowness you can reproduce it by surfing to any site using a new IE instance - same slowness should occur.

The possible solutions are:

1. Remove the proxy configuration from IE.
2. Configure your WCF binding with UseDefaultProxy=false.

@YaronNaveh

What's next? get this blog rss updates or register for mail updates!

0 comments: