Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web Service calls seem too slow

7 views
Skip to first unread message

Steve Schaenzer

unread,
Jul 31, 2003, 2:39:35 PM7/31/03
to
Hi,

I am concerned with the performance of my 3-tier architecture using a
WebService and a SQL Server. I have a windows client making calls to the
WebService running under IIS all written using C#. I did a simple time test
and discovered that it is taking 360 mili seconds (ms) of overhead for a
round trip to the WebService. This seems to be way out of line considering
everything is installed locally on my 3 GHz P4 box. My function call on the
WebService only takes 15 ms to execute. I am concerned because I was not
expecting to spend 375 ms to do 15ms worth of work.

I recognize that I need to make my app tolerate long response times to make
it work well across the internet. That 360ms across the internet isn't bad
but this is all local and I expected IIS to have better response times that
this.

Any ideas?

Thanks.

Steve.


Lewis Wang [MSFT]

unread,
Aug 1, 2003, 12:14:32 AM8/1/03
to
Hi Steve,

Web Service uses Soap protocol on top of HTTP. Serialization and
deserialization need to be done between the server and the client. Besides,
the network transmission also costs time, which seems to be the main
bottleneck.

To enhance the responsiveness of the client, we can use an asynchronous Web
Service invocation. Here is an article about how to use it:

Communicating with XML Web Services Asynchronously
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/ht
ml/cpconinvokingwebservicesasynchronously.asp>

Does this answer your question? Please let me know if you need more
information. Thanks.

Best Regards,
Lewis

Get Secure! - www.microsoft.com/security
<http://www.microsoft.com/security>
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Steve Schaenzer" <sp...@mpulsecmms.com>
| Subject: Web Service calls seem too slow
| Date: Thu, 31 Jul 2003 11:39:35 -0700
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <Ojii1P5V...@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework
| NNTP-Posting-Host: proxy.mpulsecmms.com 66.224.43.99
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:50268
| X-Tomcat-NG: microsoft.public.dotnet.framework

Steve Schaenzer

unread,
Aug 5, 2003, 1:35:11 PM8/5/03
to
Hi Lewis,

Thank you for your reply.

Asynchronous calls are not going to be very useful for my application where
I am making database requests on demand to flip through user records and
need the data to be the latest fresh data available.

There must be some timing problems in the request and responce sequenence
for making the web service call. Remember that I am configured to have
everying locally on my box. I am not even going out to the network there
should not be any wait times involved. Also- my cpu is not loading up. It is
not waiting for the processor, something else is slowing it down.

I am wondering if there might be some configuration settings I need to
change to get better responce times on the local machine?

Thanks.

Steve.
"Lewis Wang [MSFT]" <v-l...@online.microsoft.com> wrote in message
news:m16crN%23VDH...@cpmsftngxa06.phx.gbl...

Lewis Wang [MSFT]

unread,
Aug 6, 2003, 11:47:46 AM8/6/03
to
Hi Steve,

You can monitor the performance of the web service to find where is the
bottleneck and tune it. Please look this article:

Monitor Web Service Performance
<http://www.fawcette.com/xmlmag/2002_10/online/webservices_rjennings_10_30_0
2/>

Here is another article. I think it should be helpful:
Performance Comparison: .NET Remoting vs. ASP.NET Web Services
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/
bdadotnetarch14.asp


Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Steve Schaenzer" <sp...@mpulsecmms.com>

| References: <Ojii1P5V...@TK2MSFTNGP12.phx.gbl>
<m16crN#VDHA...@cpmsftngxa06.phx.gbl>
| Subject: Re: Web Service calls seem too slow
| Date: Tue, 5 Aug 2003 10:35:11 -0700
| Lines: 102


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <eI90Bl3W...@TK2MSFTNGP10.phx.gbl>


| Newsgroups: microsoft.public.dotnet.framework
| NNTP-Posting-Host: proxy.mpulsecmms.com 66.224.43.99

| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:50609
| X-Tomcat-NG: microsoft.public.dotnet.framework

Steve Schaenzer

unread,
Aug 6, 2003, 5:47:41 PM8/6/03
to
Hi Lewis,

Thanks for the links.

That timer is nice, now I have more accurate #'s to use.

I discovered today that if I turn on anonymous access I save 375ms on my
calling time!!!! This is the giant overhead culprit I have been looking for!

Using Integrated Windows authentication appears to be the bottle neck.
I can't believe that it takes so long for doing Integrated Windows
authentication but it does. At least on my network it does.

Now I need to find out if there is any way I can speed this up by adjusting
network settings or if it is possible to use both Integrated Windows
authentication and also Anonymous access with the same Web Service, or
publish two web services from the same Solution... One with integrated
windows authentication for doing a logon and one with anonymous access for
performance.

Any suggestions?

Thanks.

Steve.

Lewis Wang [MSFT]

unread,
Aug 8, 2003, 8:06:36 AM8/8/03
to
Hi Steve,

You can set HttpWebClientProtocol.UnsafeAuthenticatedConnectionSharing to
true to improve the performance of NTLM authentication. This property
should be used only if NTLM performance blocks adoption of the .NET
Framework. If you set the property to true, you can expose security holes.
The default setting for this property is false. When you set
UnsafeAuthenticatedConnectionSharing to true, .NET Framework classes re-use
previous server connections for authentication.

You can check these links for more information:

Web Services Security
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht
ml/SecNetch10.asp

HttpWebClientProtocol.UnsafeAuthenticatedConnectionSharing Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwebservicesprotocolshttpwebclientprotocolclassunsafeauthenticated
connectionsharingtopic.asp

Performance hit while using windows authentication
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=Owv0LaL6
CHA.1912%40TK2MSFTNGP10.phx.gbl&rnum=2&prev=/groups%3Fq%3DWeb%2BService%2BWi
ndows%2BAuthentication%2Bperformance%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DU
TF-8%26selm%3DOwv0LaL6CHA.1912%2540TK2MSFTNGP10.phx.gbl%26rnum%3D2

Q264921 INFO: How IIS Authenticates Browser Clients
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q264921

Q308160 HOW TO: Configure IIS Web Authentication in Windows 2000
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q308160

Q158229 INFO: Security Ramifications for IIS Applications
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q158229

Hope this helps.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Steve Schaenzer" <sp...@mpulsecmms.com>
| References: <Ojii1P5V...@TK2MSFTNGP12.phx.gbl>
<m16crN#VDHA...@cpmsftngxa06.phx.gbl>

<eI90Bl3W...@TK2MSFTNGP10.phx.gbl>
<CUsoWIDX...@cpmsftngxa06.phx.gbl>


| Subject: Re: Web Service calls seem too slow

| Date: Wed, 6 Aug 2003 14:47:41 -0700
| Lines: 28


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <e2V7qUGX...@TK2MSFTNGP09.phx.gbl>


| Newsgroups: microsoft.public.dotnet.framework
| NNTP-Posting-Host: proxy.mpulsecmms.com 66.224.43.99

| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:50709
| X-Tomcat-NG: microsoft.public.dotnet.framework

0 new messages