473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.
Nov 18 '05 #1
4 1382
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:%2****************@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.

Nov 18 '05 #2
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:OO**************@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:%2****************@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.


Nov 18 '05 #3
Ed
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**************@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:OO**************@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:%2****************@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.

Nov 18 '05 #4
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*************@yahoo.com> wrote in message
news:15**************************@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**************@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:OO**************@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:%2****************@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.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
8
by: Keith H | last post by:
I'm looking for a way to force the user to re-authenticate with their Windows username/password/domain after clicking the submit button on an ASP.NET page. This is for an internal application. ...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
3
by: DK | last post by:
I have an intranet application I've built using asp.net 3.5 / running on IIS6. The problem: when a user trys to access a page that they do not have access to, they are given the annoying windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.