Windows authentication on a Web service returning Access Denied (401).

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

  1. #1

    Default Windows authentication on a Web service returning Access Denied (401).

    Hey,

    [ Background ]
    I've been asked to look into network security where an IIS virtual directory
    is configure to not have anonymous access, but rather to go with the windows
    authentication (what the user signs in as at client). This is in the context
    of a ASP.Net web service running on an intranet.

    [ What I have done ]
    - I've ticked and unticked all the right boxes in IIS.
    - I've also added the
    "myserviceproxy.Credentials =
    System.Net.CredentialCache.DefaultCredentials;"
    to the client side [ Web / Windows ] Application so that they are passed
    through to the server for the request message.
    - I've also ensured that my user account on the client side, is registered
    as a user on the server on which the web service resides.

    [ The problem ]
    But when I try to process any messages, I get back an HTTP 401: Access
    Denied message.
    What am I doing wrong, or not doing at all?
    I'm very new to all this, so if I'm missing something obvious, please
    forgive me.

    Thanks for your time.
    Daniel.


    Daniel Bass Guest

  2. Similar Questions and Discussions

    1. MX2004 User Authentication: Access Denied
      Hi, i am using the dreamweaver mx 2004 user authentication scripting...and it actually works, but very often users get an access denied url like...
    2. Web Service + Anon Access, but getting 401 Access Denied Error
      I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    3. Access Denied - Network Service vs Local Service
      I have been struggling with my ASP.NET (V1.1 sp1) websites getting an 'Access Denied' message. I have track down the problem (I think) to the IIS...
    4. Web Service Access Denied with MS Word
      I have a web service that uses MS Word to do mail merge and printing. It works fine when running on my development machine. But when I deploy it...
    5. Access Denied using Windows Authentication. WSE 2.0
      Subject: Access Denied using Windows Authentication. WSE 2.0 When using custom authentication (using the UsernameTokenManager interface.) I...
  3. #2

    Default Re: Windows authentication on a Web service returning Access Denied (401).

    Daniel,

    What happens when you just go to the .asmx page using IE?

    -Paul

    "Daniel Bass" <I'm really @ sick of spam> wrote in message
    news:%23XjFjp$6DHA.2496@TK2MSFTNGP09.phx.gbl...
    > Hey,
    >
    > [ Background ]
    > I've been asked to look into network security where an IIS virtual
    directory
    > is configure to not have anonymous access, but rather to go with the
    windows
    > authentication (what the user signs in as at client). This is in the
    context
    > of a ASP.Net web service running on an intranet.
    >
    > [ What I have done ]
    > - I've ticked and unticked all the right boxes in IIS.
    > - I've also added the
    > "myserviceproxy.Credentials =
    > System.Net.CredentialCache.DefaultCredentials;"
    > to the client side [ Web / Windows ] Application so that they are
    passed
    > through to the server for the request message.
    > - I've also ensured that my user account on the client side, is registered
    > as a user on the server on which the web service resides.
    >
    > [ The problem ]
    > But when I try to process any messages, I get back an HTTP 401: Access
    > Denied message.
    > What am I doing wrong, or not doing at all?
    > I'm very new to all this, so if I'm missing something obvious, please
    > forgive me.
    >
    > Thanks for your time.
    > Daniel.
    >
    >

    Paul Guest

  4. #3

    Default Re: Windows authentication on a Web service returning Access Denied (401).

    Paul

    That works as you'd expect, giving you that page with the avialable methods
    on the web service.

    Dan

    "Paul" <a@b.com> wrote in message
    news:OOAVR7A7DHA.2404@TK2MSFTNGP12.phx.gbl...
    Daniel,

    What happens when you just go to the .asmx page using IE?

    -Paul

    "Daniel Bass" <I'm really @ sick of spam> wrote in message
    news:%23XjFjp$6DHA.2496@TK2MSFTNGP09.phx.gbl...
    > Hey,
    >
    > [ Background ]
    > I've been asked to look into network security where an IIS virtual
    directory
    > is configure to not have anonymous access, but rather to go with the
    windows
    > authentication (what the user signs in as at client). This is in the
    context
    > of a ASP.Net web service running on an intranet.
    >
    > [ What I have done ]
    > - I've ticked and unticked all the right boxes in IIS.
    > - I've also added the
    > "myserviceproxy.Credentials =
    > System.Net.CredentialCache.DefaultCredentials;"
    > to the client side [ Web / Windows ] Application so that they are
    passed
    > through to the server for the request message.
    > - I've also ensured that my user account on the client side, is registered
    > as a user on the server on which the web service resides.
    >
    > [ The problem ]
    > But when I try to process any messages, I get back an HTTP 401: Access
    > Denied message.
    > What am I doing wrong, or not doing at all?
    > I'm very new to all this, so if I'm missing something obvious, please
    > forgive me.
    >
    > Thanks for your time.
    > Daniel.
    >
    >


    Daniel Bass Guest

  5. #4

    Default Re: Windows authentication on a Web service returning Access Denied (401).

    Daniel or Paul,

    Was there any resolution to this problem? I am having the same
    problem as Daniel describes. I have even gone as far as making a
    "dummy" method on the web service that returns the
    System.Net.Security.WindowsPrincipal.Identity and it shows my user
    name.... When I try to connect to a SQL Server DB from that same Web
    Service, using SSPI, it tries to connect as anonymous.

    Is there some setting that I am missing?

    Thanks, any information would be helpful.

    Ed Castaneda


    "Daniel Bass" <I'm really @ sick of spam> wrote in message news:<Om$sDFJ7DHA.2088@TK2MSFTNGP10.phx.gbl>...
    > Paul
    >
    > That works as you'd expect, giving you that page with the avialable methods
    > on the web service.
    >
    > Dan
    >
    > "Paul" <a@b.com> wrote in message
    > news:OOAVR7A7DHA.2404@TK2MSFTNGP12.phx.gbl...
    > Daniel,
    >
    > What happens when you just go to the .asmx page using IE?
    >
    > -Paul
    >
    > "Daniel Bass" <I'm really @ sick of spam> wrote in message
    > news:%23XjFjp$6DHA.2496@TK2MSFTNGP09.phx.gbl...
    > > Hey,
    > >
    > > [ Background ]
    > > I've been asked to look into network security where an IIS virtual
    > directory
    > > is configure to not have anonymous access, but rather to go with the
    > windows
    > > authentication (what the user signs in as at client). This is in the
    > context
    > > of a ASP.Net web service running on an intranet.
    > >
    > > [ What I have done ]
    > > - I've ticked and unticked all the right boxes in IIS.
    > > - I've also added the
    > > "myserviceproxy.Credentials =
    > > System.Net.CredentialCache.DefaultCredentials;"
    > > to the client side [ Web / Windows ] Application so that they are
    > passed
    > > through to the server for the request message.
    > > - I've also ensured that my user account on the client side, is registered
    > > as a user on the server on which the web service resides.
    > >
    > > [ The problem ]
    > > But when I try to process any messages, I get back an HTTP 401: Access
    > > Denied message.
    > > What am I doing wrong, or not doing at all?
    > > I'm very new to all this, so if I'm missing something obvious, please
    > > forgive me.
    > >
    > > Thanks for your time.
    > > Daniel.
    > >
    > >
    Ed Guest

  6. #5

    Default Re: Windows authentication on a Web service returning Access Denied (401).

    Have you setup directory permissions (ACL's) on the base directory of the
    web app allowing at least read access to the domain users / groups that are
    to access the webservice ?
    This is how it is set up for us and it works very well.

    You might be authenticated all right but you don't have any access to the
    directory so IIS dosen't allow you in.

    Chris.

    "Ed" <ed_castaneda_oh@yahoo.com> wrote in message
    news:15ef71f5.0402110528.2714363d@posting.google.c om...
    > Daniel or Paul,
    >
    > Was there any resolution to this problem? I am having the same
    > problem as Daniel describes. I have even gone as far as making a
    > "dummy" method on the web service that returns the
    > System.Net.Security.WindowsPrincipal.Identity and it shows my user
    > name.... When I try to connect to a SQL Server DB from that same Web
    > Service, using SSPI, it tries to connect as anonymous.
    >
    > Is there some setting that I am missing?
    >
    > Thanks, any information would be helpful.
    >
    > Ed Castaneda
    >
    >
    > "Daniel Bass" <I'm really @ sick of spam> wrote in message
    news:<Om$sDFJ7DHA.2088@TK2MSFTNGP10.phx.gbl>...
    > > Paul
    > >
    > > That works as you'd expect, giving you that page with the avialable
    methods
    > > on the web service.
    > >
    > > Dan
    > >
    > > "Paul" <a@b.com> wrote in message
    > > news:OOAVR7A7DHA.2404@TK2MSFTNGP12.phx.gbl...
    > > Daniel,
    > >
    > > What happens when you just go to the .asmx page using IE?
    > >
    > > -Paul
    > >
    > > "Daniel Bass" <I'm really @ sick of spam> wrote in message
    > > news:%23XjFjp$6DHA.2496@TK2MSFTNGP09.phx.gbl...
    > > > Hey,
    > > >
    > > > [ Background ]
    > > > I've been asked to look into network security where an IIS virtual
    > > directory
    > > > is configure to not have anonymous access, but rather to go with the
    > > windows
    > > > authentication (what the user signs in as at client). This is in the
    > > context
    > > > of a ASP.Net web service running on an intranet.
    > > >
    > > > [ What I have done ]
    > > > - I've ticked and unticked all the right boxes in IIS.
    > > > - I've also added the
    > > > "myserviceproxy.Credentials =
    > > > System.Net.CredentialCache.DefaultCredentials;"
    > > > to the client side [ Web / Windows ] Application so that they are
    > > passed
    > > > through to the server for the request message.
    > > > - I've also ensured that my user account on the client side, is
    registered
    > > > as a user on the server on which the web service resides.
    > > >
    > > > [ The problem ]
    > > > But when I try to process any messages, I get back an HTTP 401: Access
    > > > Denied message.
    > > > What am I doing wrong, or not doing at all?
    > > > I'm very new to all this, so if I'm missing something obvious, please
    > > > forgive me.
    > > >
    > > > Thanks for your time.
    > > > Daniel.
    > > >
    > > >

    Christian Boult 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