I have a windows phone application that uses WCF services to get and store data on the DB. I added a service reference to the WCF service and VS generated the client proxy and the configuration file.
The problem starts when I try to call methods on the server.
The first call causes a timeout, the server doesn't even receive the request. Only in the second call the server receives the request.
Win7MobileServiceClient client = new Win7MobileServiceClient();
client.GetUserCompleted += new EventHandler<ServiceReference1.GetUserCompletedEventArgs>(client_GetUserCompleted);
client.GetUserAsync(int.Parse(txtID.Text));
Thanks
This is probably due to the warm up process of service. First time that a WCF service is invoked it takes some time (I think is compiling it). It will happen again if you recycle app pools.
In order to be sure try this
If this is the case probably the reason is that default timeout in windows mobile client maybe is smaller than stantaderd (1min). There is a number of solutions you can do like
You can check this similar question: WCF Performance Slow for the first call