Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

Web Services on Win 2003 to SQL Server on Win 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Singer - 07 Sep 2004 22:52 GMT
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?
[MSFT] - 08 Sep 2004 06:46 GMT
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
Peter Singer - 08 Sep 2004 15:53 GMT
> Hello,
>
[quoted text clipped - 5 lines]
>
> 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.
Peter Singer - 08 Sep 2004 21:15 GMT
> Hello,
>
[quoted text clipped - 5 lines]
>
> 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?
[MSFT] - 09 Sep 2004 04:39 GMT
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
Peter Singer - 09 Sep 2004 12:49 GMT
> 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
[quoted text clipped - 4 lines]
>
> 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?
[MSFT] - 10 Sep 2004 06:54 GMT
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
Peter Singer - 10 Sep 2004 14:45 GMT
> 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?
Tim - 11 Sep 2004 05:27 GMT
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

> > 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
[quoted text clipped - 10 lines]
> the web service seems to have a major impact on performance. Any other
> ideas?
[MSFT] - 13 Sep 2004 08:52 GMT
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
Yan-Hong Huang[MSFT] - 15 Sep 2004 10:28 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.