Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Poor performance with NT Authentication
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dave Morgereth  
View profile  
 More options Apr 30 2003, 2:30 pm
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
From: "Dave Morgereth" <dmorger...@costargroup.com>
Date: Wed, 30 Apr 2003 14:26:19 -0400
Local: Wed, Apr 30 2003 2:26 pm
Subject: Poor performance with NT Authentication
Our web service's virtual directory is secured via NT Authentication.  We
are experiencing ever-worsening performance during each clients initial
attempt to access the web service.  Once the first request completes,
subsequent requests have acceptable performance.   I realize this is a
rather vague request but does anyone have any suggestions as to how to
troubleshoot this?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tomas Restrepo \(MVP\)  
View profile  
 More options Apr 30 2003, 7:20 pm
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
From: "Tomas Restrepo \(MVP\)" <tom...@mvps.org>
Date: Wed, 30 Apr 2003 18:18:52 -0500
Local: Wed, Apr 30 2003 7:18 pm
Subject: Re: Poor performance with NT Authentication
Dave,

> Our web service's virtual directory is secured via NT Authentication.  We
> are experiencing ever-worsening performance during each clients initial
> attempt to access the web service.  Once the first request completes,
> subsequent requests have acceptable performance.   I realize this is a
> rather vague request but does anyone have any suggestions as to how to
> troubleshoot this?

Integrated Authentication in general is heavy, in the sense that it requires
multiple exchanges between the client and server during the initial request
(this is because the NTLM or kerberos protocol is used with
challenge/response to do the auth). This is easy to watch just using a
tracing tool.

There's not much you can do about that, except changing authentication
methods, I think.

--
Tomas Restrepo
tom...@mvps.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Qiu  
View profile  
 More options May 2 2003, 6:05 pm
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
From: davidqiuonl...@microsoft.com (David Qiu)
Date: Fri, 02 May 2003 22:03:40 GMT
Local: Fri, May 2 2003 6:03 pm
Subject: RE: Poor performance with NT Authentication
Dave,
Assuming there is no delay when you access the Web service with anonymous
access, then the delay would be caused by integrated authentication.
Otherwise it will be something else.

In ASP.NET, by default authentication occurs for each request (doesn't
matter its the first request or sebsequent) so you should see the same
delay on each request. Otherwise it could be something else going on
causing the problem. One example is, the Web service accesses DB, the name
resolution takes sometime and once the name is resolved it is cached. So
the first time is slow and then subsequent is fast and will be slow again
if the service is idle for some time and the cached expires. You can use
Network Monitor to get a network trace to troubleshoot the network problem.

If anonymous is fast but integrated auth is slow for every request, read
the info below:

NTLM authentication is connection-based on IIS by default. That means NTLM
authentication occurs only on the first request on each connection. There
is no authentication for subsequent requests on the same connection. This
greatly improves the performance by eliminating the overheads associated
with NTLM authentication. For example, in the following code, User A will
be authenticated to access the Web service. UserB can access the Web
service without authentication.

NetworkCredential myCred = new
NetworkCredential("UserA","PasswordA","DomainA");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("http://server/webservicetest/service1.asmx"), "NTLM",
myCred);
svc.Credentials = myCache;
string result = svc.HelloWorld();

myCred = new NetworkCredential("UserB","PasswordB","DomainB");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("http://server/webservicetest/service1.asmx"), "NTLM",
myCred);
svc.Credentials = myCache;
result = svc.HelloWorld();

In .NET, there is a change in the behavior. Each request will be
authenticated. .NET achieves this by closing each connection from .NET Web
clients when communicating with IIS. So a new connection will be opened for
each request and hence each request will be authenticated. Both UserA and
UserB will be authenticated in the sample above.

This design has significant overhead because NTLM is expensive. We
escalated this issue to the Microsoft Web service product team. They came
up with a solution. The solution requires installing a fix in .NET 1.0
(rolled into v1.1). Two properties were added:
UnsafeAuthenticatedConnectionSharing and ConnectionGroupName.

UnsafeAuthenticatedConnectionSharing is FALSE by default, meaning the same
behavior as without the fix. However if you install the hot fix and you set
UnsafeAuthenticatedConnectionSharin to true, the connection will NOT be
closed after a request. Any request belonging to the same
ConnectionGroupName will share the same authenticated connection
(authentication only once for each ConnectionGroupName). Multiple requests
with different ConnectionGroupName will use different connections. In the
example below, each request will use its own connection and will be
authenticated individually because they have different GroupConnectionName.
If I change svc.ConnectionGroupName = "b" to svc.ConnectionGroupName = "a"
both requests will share the same connection and only the first request
will be authenticated.

svc.UnsafeAuthenticatedConnectionSharing = true;
NetworkCredential myCred = new
NetworkCredential("UserA","PasswordA","DomainA");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("http://server/webservicetest/service1.asmx"), "NTLM",
myCred);
svc.Credentials = myCache;
svc.ConnectionGroupName = "a";
string result = svc.HelloWorld();

myCred = new NetworkCredential("UserB","PasswordB","DomainB");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("http://server/webservicetest/service1.asmx"), "NTLM",
myCred);
svc.Credentials = myCache;
svc.ConnectionGroupName = "b";
result = svc.HelloWorld();

I wish it helps,
David
Microsoft Developer Support
Distributed Services

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Morgereth  
View profile  
 More options May 5 2003, 10:22 am
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
From: "Dave Morgereth" <dmorger...@costargroup.com>
Date: Mon, 5 May 2003 09:24:57 -0400
Local: Mon, May 5 2003 9:24 am
Subject: Re: Poor performance with NT Authentication
Thanks David - that helps a lot

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Qiu  
View profile  
 More options May 5 2003, 10:53 am
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
From: davidqiuonl...@microsoft.com (David Qiu)
Date: Mon, 05 May 2003 14:51:42 GMT
Local: Mon, May 5 2003 10:51 am
Subject: Re: Poor performance with NT Authentication
You are very welcome, Dave.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google