Hi all
I have a .net forms application that uses a webservice and calls several methods on the service, and everything works as it should. Well, almost that is... And I hope some of you can help me troubleshoot the problem, and I'm posting here because I think it's the webservice that is the problem.
My problem is that I'm getting a fixed response time of ~500 millis on every call I make to the service. And since these calls are done to localhost they should in theory send response data instantly to my application. Please note that is doesn't matter if the webservice method is a simple HelloWorld method or a method that actually returns something usefull. The webservice has been added to application solution through Web references in VS.
If I for example call several methods after each other I get the following timing result:
21:25:42 689 - Call HelloWorld1()
21:25:43 296 - Call HelloWorld2()
21:25:43 793 - Call HelloWorld3()
21:25:44 293 - Call HelloWorld4()
21:25:44 793 - Call HelloWorld5()
21:25:45 293 - Call HelloWorld6()
The calls have to be sync. calls, but I did try async calls just to varify the response time, but with no difference.
While trying to troubleshoot why I get this strange 500 millis delay on every call, I've tried making a sort of ping/download tool with HttpWebRequest, and here I get something I don't understand.
When I use HttpWebRequest and download the webservice.asmx url I get the same 500 millis delay, but if I add ?op=HelloWorld in the url something finally happens. The response time is down to 4-5 millis, which is what it should be.
Ok, So I thought, then I just use HttpWebRequest and call the webservice with post data and use webservice.asmx/HelloWorld in the url. But no, same result: 500 millis delay on every response :(
This is really beginning to bug me a lot and I hope someone can help me :)