Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Windows authentication on a Web service returning Access Denied (401).

Reply
Thread Tools

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

 
 
Daniel Bass
Guest
Posts: n/a
 
      02-05-2004
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.


 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      02-05-2004
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$(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
Daniel Bass
Guest
Posts: n/a
 
      02-06-2004
Paul

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

Dan

"Paul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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$(E-Mail Removed)...
> 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.
>
>




 
Reply With Quote
 
Ed
Guest
Posts: n/a
 
      02-11-2004
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$(E-Mail Removed)>...
> Paul
>
> That works as you'd expect, giving you that page with the avialable methods
> on the web service.
>
> Dan
>
> "Paul" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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$(E-Mail Removed)...
> > 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.
> >
> >

 
Reply With Quote
 
Christian Boult
Guest
Posts: n/a
 
      02-18-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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$(E-Mail Removed)>...
> > Paul
> >
> > That works as you'd expect, giving you that page with the avialable

methods
> > on the web service.
> >
> > Dan
> >
> > "Paul" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > 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$(E-Mail Removed)...
> > > 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.
> > >
> > >



 
Reply With Quote
 
shijobaby shijobaby is offline
Junior Member
Join Date: Dec 2009
Posts: 7
 
      02-06-2010
If your web service anonymous authentication is


turned off you must enable that

Otherwise you have to pass username and password
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Web Service that calls other Web Service with Windows Authentication manuelserpabrandao@gmail.com ASP .Net Web Services 3 06-17-2006 08:14 AM
Calling Web Service that calls other Web Service with Windows Authentication manuelserpabrandao@gmail.com ASP .Net Security 1 06-14-2006 08:55 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Web Service + Anon Access, but getting 401 Access Denied Error Alex Washtell via .NET 247 ASP .Net Web Services 1 04-05-2005 04:57 PM
Windows authentication on a Web service returning Access Denied (401). Daniel Bass ASP .Net Security 3 02-11-2004 01:28 PM



Advertisments