I have a WPF desktop application ( .NET 4.0 ) that is talking to an existing asmx service that was written using .NET 2.0
Here is the code we are using to access the service
Stopwatch s = new System.Diagnostics.Stopwatch();
s.Start();
APMService svc = new APMService();
UserInfoExtended[] Users = svc.FindAllUsers(LicenseKey);
s.Stop();
TimeSpan ts = s.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
MessageBox.Show("WS CALL" + " : " + elapsedTime);
return Users;
Ok now when I run this code for the first time ( its hooked up to a button click ) it takes about 19 seconds. When I click the button again it takes less than one second. This is 100% repro. What makes this baffling is I wrote a console client against the webservice ( .NET 2.0 ) and it takes less than one second every time. what am I missing here.
Is this a WPF thing? the way it interacts with the (de)serializer for the asmx service . Is the fact that the service is on .NET 2.0 causing an issue.
Any suggestions welcome
Thanks