Double number of calls when Basic Authentication?

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Double number of calls when Basic Authentication?

    I have a web service that is set to use Basic Authentication (for users
    outside the firewall). They are coming in over SSL. It uses Integrated
    Authentication for internal users.

    For the users who are requesting service with Basic Authentication, there is
    a VB.Net client application which is using the NetworkCredential to pass the
    authentication information to the web service.

    However, the sequence of events that seems to always happen is:

    1. client sends request
    2. service responds with 401
    3. client sends request again, this time including the authentication
    information (user, password, domain)

    So, in my IIS logs, there is a duplicate entry for each call to the web
    service. The first log entry has a user value of " - " (this entry also has
    the 401 code returned), and the second log entry has the correct user name.
    I am certain that this is affecting overall performance of the web service.

    What do I need to do in order to eliminate this "round-trip" from happening?

    Thanks,
    Joe


    Joe H Guest

  2. Similar Questions and Discussions

    1. Is it support for round double number in flex
      Hi, I want to round a double value in flex, such as 1.234, I want to get 2 bits after the radix point. I can only find Math.round() in flex which...
    2. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    3. Limit the number of asyn web service calls
      I have a web service the makes calls asynchronously to a server to download files. The user has the ability to select many files to download. When...
    4. User authentication on Web Service calls from an NTD app
      I am developing a Windows Forms application that makes requests to a web service and in return receives configuration data that is user specific,...
    5. Number of sites calls
      Jenny, The way I would handle this is to store information in an Application variable. You could increment an integer value to keep track of the...
  3. #2

    Default Re: Double number of calls when Basic Authentication?

    That's the way any HTTP authentication system works (by default). If you use
    NTLM v2 (part of Integrated Windows Auth) you'll see even more requests
    logged :-)

    The first request is anonymous. The server denies the anonymous request, and
    sends back a list of supported authentication mechanisms. The client picks
    the strongest one that it supports, and then attempts the request again
    using credentials. Most clients will then cache the credentials for
    subsequent accesses to the server, until the client is terminated.

    Now, I suppose you could build a custom client that doesn't attempt
    anonymous authentication first - it authenticates from the very first
    request.

    Cheers
    Ken


    "Joe H" <jharri@hotmail.com> wrote in message
    news:OL82otxQEHA.3348@TK2MSFTNGP09.phx.gbl...
    : I have a web service that is set to use Basic Authentication (for users
    : outside the firewall). They are coming in over SSL. It uses Integrated
    : Authentication for internal users.
    :
    : For the users who are requesting service with Basic Authentication, there
    is
    : a VB.Net client application which is using the NetworkCredential to pass
    the
    : authentication information to the web service.
    :
    : However, the sequence of events that seems to always happen is:
    :
    : 1. client sends request
    : 2. service responds with 401
    : 3. client sends request again, this time including the authentication
    : information (user, password, domain)
    :
    : So, in my IIS logs, there is a duplicate entry for each call to the web
    : service. The first log entry has a user value of " - " (this entry also
    has
    : the 401 code returned), and the second log entry has the correct user
    name.
    : I am certain that this is affecting overall performance of the web
    service.
    :
    : What do I need to do in order to eliminate this "round-trip" from
    happening?
    :
    : Thanks,
    : Joe
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: Double number of calls when Basic Authentication?

    I don't think this is a big deal. I am sure there are other areas that
    you can get more bang for the buck.

    On a side not if the user you are authenticating happens to have me a
    member of more than 150 groups, then you will see some serious network
    traffic in the range of 3000+ calls to the domain server.


    Joe H wrote:
    > I have a web service that is set to use Basic Authentication (for users
    > outside the firewall). They are coming in over SSL. It uses Integrated
    > Authentication for internal users.
    >
    > For the users who are requesting service with Basic Authentication, there is
    > a VB.Net client application which is using the NetworkCredential to pass the
    > authentication information to the web service.
    >
    > However, the sequence of events that seems to always happen is:
    >
    > 1. client sends request
    > 2. service responds with 401
    > 3. client sends request again, this time including the authentication
    > information (user, password, domain)
    >
    > So, in my IIS logs, there is a duplicate entry for each call to the web
    > service. The first log entry has a user value of " - " (this entry also has
    > the 401 code returned), and the second log entry has the correct user name.
    > I am certain that this is affecting overall performance of the web service.
    >
    > What do I need to do in order to eliminate this "round-trip" from happening?
    >
    > Thanks,
    > Joe
    >
    >
    Joseph E Shook [MVP - ADSI] Guest

  5. #4

    Default Re: Double number of calls when Basic Authentication?

    Did you set PreAuthenticate to true on your webservice proxy object? I
    think that will cause it to pass the credentials by default without the 401.

    Joe K.

    "Joe H" <jharri@hotmail.com> wrote in message
    news:OL82otxQEHA.3348@TK2MSFTNGP09.phx.gbl...
    > I have a web service that is set to use Basic Authentication (for users
    > outside the firewall). They are coming in over SSL. It uses Integrated
    > Authentication for internal users.
    >
    > For the users who are requesting service with Basic Authentication, there
    is
    > a VB.Net client application which is using the NetworkCredential to pass
    the
    > authentication information to the web service.
    >
    > However, the sequence of events that seems to always happen is:
    >
    > 1. client sends request
    > 2. service responds with 401
    > 3. client sends request again, this time including the authentication
    > information (user, password, domain)
    >
    > So, in my IIS logs, there is a duplicate entry for each call to the web
    > service. The first log entry has a user value of " - " (this entry also
    has
    > the 401 code returned), and the second log entry has the correct user
    name.
    > I am certain that this is affecting overall performance of the web
    service.
    >
    > What do I need to do in order to eliminate this "round-trip" from
    happening?
    >
    > Thanks,
    > Joe
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: Double number of calls when Basic Authentication?

    yes... i finally figured this out...seems that the trick is to create a
    credential cache...then create a network credential...set up the properties
    of the network credential, and then add it to the cache...then set
    PreAuthenticate to true on the proxy...and it works...

    thanks to all for input...

    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:uDhd8i3QEHA.252@TK2MSFTNGP10.phx.gbl...
    > Did you set PreAuthenticate to true on your webservice proxy object? I
    > think that will cause it to pass the credentials by default without the
    401.
    >
    > Joe K.
    >
    > "Joe H" <jharri@hotmail.com> wrote in message
    > news:OL82otxQEHA.3348@TK2MSFTNGP09.phx.gbl...
    > > I have a web service that is set to use Basic Authentication (for users
    > > outside the firewall). They are coming in over SSL. It uses Integrated
    > > Authentication for internal users.
    > >
    > > For the users who are requesting service with Basic Authentication,
    there
    > is
    > > a VB.Net client application which is using the NetworkCredential to pass
    > the
    > > authentication information to the web service.
    > >
    > > However, the sequence of events that seems to always happen is:
    > >
    > > 1. client sends request
    > > 2. service responds with 401
    > > 3. client sends request again, this time including the authentication
    > > information (user, password, domain)
    > >
    > > So, in my IIS logs, there is a duplicate entry for each call to the web
    > > service. The first log entry has a user value of " - " (this entry also
    > has
    > > the 401 code returned), and the second log entry has the correct user
    > name.
    > > I am certain that this is affecting overall performance of the web
    > service.
    > >
    > > What do I need to do in order to eliminate this "round-trip" from
    > happening?
    > >
    > > Thanks,
    > > Joe
    > >
    > >
    >
    >

    Joe H Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139