Delay in Webservice Functions
-
As a beginner about making WebService routines and caller applications, I prepared WebService Application that have a few functions in Visiual Studio using C#, .Net 2.0. And I have written a client application running under WindowsCe that calls those WebSevice functions located in a Server environemnt. The system works well except for first calls. I mean: When the client calls a WebService function for the FIRST time, it takes considerable time ( at least 8-10 seconds) the functions executes and return back. Immediately after the first call, the next calls (to same function) works in good speed. So Why first calls always takes time..? Note: In Web service side, I did not use any attribute for functions. Should I use?
-
As a beginner about making WebService routines and caller applications, I prepared WebService Application that have a few functions in Visiual Studio using C#, .Net 2.0. And I have written a client application running under WindowsCe that calls those WebSevice functions located in a Server environemnt. The system works well except for first calls. I mean: When the client calls a WebService function for the FIRST time, it takes considerable time ( at least 8-10 seconds) the functions executes and return back. Immediately after the first call, the next calls (to same function) works in good speed. So Why first calls always takes time..? Note: In Web service side, I did not use any attribute for functions. Should I use?
I've struggled with this too. i found it was because internet explorer was set to automatically detect proxy settings. so. if it's set your program will try to find a proxy server and wait for timeout. add a proxy object:
System.Net.WebProxy objProxy = new System.Net.WebProxy("http://1.2.3.5:8080/", true); YourService.Proxy = objProxy;
or if you dont have a proxyYourService.Proxy = null;
it might work.If it' stuck, DO NOT pull harder!