The first web service call is slow; consumed by the compact framework win application

I have a .net 2.0 web service running on IIS 7.0.

I use this service from a compact frame application (CF 2.0). The first call takes 13 seconds, all subsequent calls are very fast (less than 1 second). Data is not cached.

Any ideas how to solve this?

+4
source share
4 answers

The first call under the CF application is when all proxy objects on the device are created. Therefore, even if objects, etc. The server is already deployed, the first call from each device will be significantly slower than any subsequent call.

A common workaround for this is that your service provides some kind of stub method (it may not do anything if you want), and when your application starts, create a workflow that calls this stub. This will create the service proxy objects in the background for you, so when your application really calls the service, everything will be ready.

+5
source

The first call is to download the .NET Runtime and JIT to call methods on the Internet. Many stores that deploy services as such do not seem to care at first glance, but when they do, they will have something to do for this challenge, as part of the deployment, to get this first timeout. Another method is NGEN it.

+3
source

Is this the first call for IIS after it starts or the server starts?
The first IIS call is always slower. We used it with a script that made a dummy call on restart or IISRESET to absorb the first call penalty.

0
source

The first time the application is called, your SQL connections open. If there is a problem with the network, this may take longer. After the time when the application is not working, the connection may be automatically closed.

0
source

All Articles