I have just started playing around with Web Services. I created a sample
Web Service and invoked a sample "Hello World" method call from my Win Forms
control running under an ASP.NET web page. The time it takes to return the
result seems a little bit much. It takes anywhere from 500 to 800
milliseconds to return a simple "Hello World" string message. This is even
running it on localhost. Is this normal for the request to take this long?
If not, what can I do to make it faster?
Here is an example of my calling logic:
private void DoCall()
{
String ServiceText;
ICredentials myCred;
MyWebService TestService = new MyWebService();
myCred = new NetworkCredential("userid","password");
TestService.Credentials = myCred;
ServiceText = TestService.HelloWorld(); // This call seems
very slow.
}

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
Ken Varn - 01 Feb 2005 14:18 GMT
I solved my own problem. I saw a KB article (810814) on the subject in .NET
Framework 1.0. The solution still applies to 1.1 when it comes to the
machine.config settings. I had to add the following to machine.config to
help speed it up.
<system.net>
<settings>
<servicePointManager useNagleAlgorithm="false"/>
<servicePointManager expect100Continue="false"/>
</settings>
</system.net>
The performance increase was substantial with these settings in place. Not
sure if there are any other ramifications to using these settings.

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
> I have just started playing around with Web Services. I created a sample
> Web Service and invoked a sample "Hello World" method call from my Win Forms
[quoted text clipped - 18 lines]
> very slow.
> }