Web Services on Win 2003 to SQL Server on Win 2000

Discussion in 'ASP .Net Web Services' started by Peter Singer, Sep 7, 2004.

  1. Peter Singer

    Peter Singer Guest

    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?
     
    Peter Singer, Sep 7, 2004
    #1
    1. Advertising

  2. Peter Singer

    [MSFT] Guest

    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
     
    [MSFT], Sep 8, 2004
    #2
    1. Advertising

  3. Peter Singer

    Peter Singer Guest

    ([MSFT]) wrote in message news:<>...
    > 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.
     
    Peter Singer, Sep 8, 2004
    #3
  4. Peter Singer

    Peter Singer Guest

    ([MSFT]) wrote in message news:<>...
    > 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?
     
    Peter Singer, Sep 8, 2004
    #4
  5. Peter Singer

    [MSFT] Guest

    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
     
    [MSFT], Sep 9, 2004
    #5
  6. Peter Singer

    Peter Singer Guest

    ([MSFT]) wrote in message news:<>...
    > 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?
     
    Peter Singer, Sep 9, 2004
    #6
  7. Peter Singer

    [MSFT] Guest

    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
     
    [MSFT], Sep 10, 2004
    #7
  8. Peter Singer

    Peter Singer Guest

    ([MSFT]) wrote in message news:<>...
    > 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?
     
    Peter Singer, Sep 10, 2004
    #8
  9. Peter Singer

    Tim Guest

    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" <> wrote in message
    news:...
    > ([MSFT]) wrote in message

    news:<>...
    > > 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, Sep 11, 2004
    #9
  10. Peter Singer

    [MSFT] Guest

    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
     
    [MSFT], Sep 13, 2004
    #10
  11. 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.
     
    Yan-Hong Huang[MSFT], Sep 15, 2004
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Smylski

    Connection to SQL 2000 on Win 2003 Server

    Ryan Smylski, Mar 30, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,495
    Brendan Green
    Apr 11, 2005
  2. =?Utf-8?B?Z2F1cmF2?=

    Uploading Data From MS Acess 2000 ti SQL server 2000

    =?Utf-8?B?Z2F1cmF2?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    809
    Mary Chipman [MSFT]
    Jan 9, 2006
  3. Vaap
    Replies:
    2
    Views:
    1,180
  4. Krist
    Replies:
    6
    Views:
    751
    Arne Vajhøj
    May 7, 2010
  5. Klaus
    Replies:
    19
    Views:
    265
    Martijn Lievaart
    Aug 21, 2010
Loading...

Share This Page