Web Services on Win 2003 to SQL Server on Win 2000

P

Peter Singer

I'm having serious performance issues in connecting from a Win 2003
Server machine to a SQL Server database on a different Win 2000 Server
machine. There is nothing other than our application running on these
machine. They are connected via 100mb ethernet. I can ping with
sub-1ms response times. In running an .NET Framework exe from the 2003
machine that connects to the database and issues a simple select
statement I get a response instantaneously. If I try and do the same
thing from a web service I get an unacceptably slow response. It
exhibits this behavior if I use ODBC or DataDirect .NET providers. If
I install the web service on the 2000 machine (which would make the
SQL Server database local to it) I don't see any delay either.

The Profiler in SQL Server shows sub-10ms responses for the select
statements. There are AUDIT LOGOUT events that show 500-700ms reponse
times. Can anyone shed any light on what that means?

Is IIS_WPG having some sort of authentication delay in attempting to
connect to the to the other server? Anyone have any other ideas?
 
M

[MSFT]

Hello,

Audit Logout Event Collects all new disconnect events since the trace was
started, such as when a client issues a disconnect command. In you web
service, did you open and close the sqlconnection frequently, for example,
for every quest? Also, did you use SQL authentication or Windows
authentication?

Luke
 
P

Peter Singer

Hello,

Audit Logout Event Collects all new disconnect events since the trace was
started, such as when a client issues a disconnect command. In you web
service, did you open and close the sqlconnection frequently, for example,
for every quest? Also, did you use SQL authentication or Windows
authentication?

Luke

We don't specifically call disconnect. We aren't making many calls.
It's all very simple SELECT statements.

We're using SQL Authentication. Same code in a Win Exe runs fast. Same
code as a web service runs slow.
 
P

Peter Singer

Hello,

Audit Logout Event Collects all new disconnect events since the trace was
started, such as when a client issues a disconnect command. In you web
service, did you open and close the sqlconnection frequently, for example,
for every quest? Also, did you use SQL authentication or Windows
authentication?

Luke

I've also set up the same web services on a win 2k server that's on a
different sub-net and has three hops to go through in order to reach
the database. I'm not seeing any performance issues. .NET web services
running on a Win2003 server that's very "close" to the SQL Server is
much, much slower than the same set of .NET Web Services on a Win2k
server that's farther away. Sql Server doesn't seem to be the issue.
The network doesn't seem to be the issue. It seems like something to
do with IIS 6. I've used all the default settings (just as I did on
our Win2003 server here) and yet something seems to be slowing it down
unacceptably. Any ideas?
 
M

[MSFT]

To confirm this is a IIS issue, I suggest you may create a very simple
ASP.NET project, open a SQLConnection and execute the Select command. If
this simple project also go slowly, that should be an IIS issue. You may
check what is the account IIS run with. Normally, IIS will run under
"network service". and this also depend on the authentication method in
your project.

Luke
 
P

Peter Singer

To confirm this is a IIS issue, I suggest you may create a very simple
ASP.NET project, open a SQLConnection and execute the Select command. If
this simple project also go slowly, that should be an IIS issue. You may
check what is the account IIS run with. Normally, IIS will run under
"network service". and this also depend on the authentication method in
your project.

Luke

I've done that. The test application by itself doesn't exhibit the
delays. However, if I put the dll's from my main application in the
test web services bin directory, the test web service exhibits the
delay. These assemblies aren't used or referenced in any way by the
test web service. What could possibly be causing the web service to
slow down if I simply put some dlls' in the bin directory that aren't
being use by the application?
 
M

[MSFT]

How many DLLs are there in the project? Is there any interop DLLs? I
suggest you may create a new web service project, then add all class and
modules in your original project, compile it and test again. Can this fix
the problem?

Luke
 
P

Peter Singer

How many DLLs are there in the project? Is there any interop DLLs? I
suggest you may create a new web service project, then add all class and
modules in your original project, compile it and test again. Can this fix
the problem?

Luke

2 in the test web service. When we add the others from our main app
there are maybe 5 additional. I'm not following what you're
suggesting. The dll's from our main application aren't used by the
test application, so there are no references to add or anything like
that. Just the act of copying unrelated dll's to the bin directory of
the web service seems to have a major impact on performance. Any other
ideas?
 
T

Tim

TOTAL guess...if it's working quickly on the local SQL server, but slowing
down on the connection through the network you may want to check to see if
the web service doing some kind of autentication with the domain that is
causing it to slow down. There may be issues converting from 2003 security
authentication to 2000 security autentication. For kicks, if you can you
may want to try putting the SQL DB on a 2003 machine to see if it plays
nicer together.

I was reading this article
http://msdn.microsoft.com/msdnmag/issues/03/06/WindowsServer2003/default.aspx
and it mentions about running IIS 6.0 in 5.0 protection mode. "If desired,
you can run it in the three IIS 5.0 protection levels as well." You might
try that to see if that simulates IIS 5.0 on a 2003 box. That might help
identify if it's a IIS 6.0 issue.

Tim

Peter Singer said:
(e-mail address removed) ([MSFT]) wrote in message
How many DLLs are there in the project? Is there any interop DLLs? I
suggest you may create a new web service project, then add all class and
modules in your original project, compile it and test again. Can this fix
the problem?

Luke

2 in the test web service. When we add the others from our main app
there are maybe 5 additional. I'm not following what you're
suggesting. The dll's from our main application aren't used by the
test application, so there are no references to add or anything like
that. Just the act of copying unrelated dll's to the bin directory of
the web service seems to have a major impact on performance. Any other
ideas?
 
M

[MSFT]

Thank for Tim's suggestion. Plus, the delay may also occur inner the
assembly. At runtime, ASP.NET will load classes from assemblies in BIN
folder. For example, when a client request. webform1.aspx, ASP.NET will
load class "Webform1" from the DLLs. Therefore, after you copy the DLLs to
the test project's BIN folder. They are also scaned by the ASP.NET. This is
why I suggest to rebuild your original project to see if this a problem in
the assembly. You may also consider Tim's suggestion, to check if this a
security issue.

Luke
 
Y

Yan-Hong Huang[MSFT]

Hello Petes,

I was reviewing this issue thread. Do you still have any more concerns on
it? If there is any question, please feel free to post here and we will
follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top