all groups > dotnet web services enhancements > december 2005 >
You're in the

dotnet web services enhancements

group:

WS and Windows Authentication


RE: WS and Windows Authentication GCR
12/12/2005 7:39:02 AM
dotnet web services enhancements:
If your web service is running in the intranet, than you have to configure
the directory security for the web service in IIS with integrated windows
authentication (only) and have in the web.config the <authentication
mode="Windows" /> and <identity impersonate="true" />. This way you force the
web service to run in the security context of the calling user and you can
cast the Identity property of the User to WindowsIdentity.

[quoted text, click to view]
Re: WS and Windows Authentication GCR
12/12/2005 8:18:03 AM
Over the HttpContext.User property, that provides programmatic access to the
properties and methods of the IPrincipal interface. When you use Windows
authentication, the IPrincipal is an WindowsPrincipal and over
WindowsPrincipal.IsInRole method you can check the membership of the user in
a Windows group.

[quoted text, click to view]
Re: WS and Windows Authentication GCR
12/12/2005 8:45:02 AM
Not WebConfig.ini, but web.config - this is the configuration file for
ASP.net applications!!!!!! See following link for further details
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconapplicationrootdirectoryconfigurationfilewebconfig.asp

[quoted text, click to view]
WS and Windows Authentication Jimmy
12/12/2005 12:37:58 PM
Hi,

I need to develop a secure Web Service that requires a username and
password. One of the requirements is that the WS supports Windows
Authentication, meaning accepts the username and password the client used to
log on to Windows. The WS then needs to see which Active Directory roles
the user belongs to and allow the user (or not) to perform specific tasks
with the WS.

Can anyone please point me in the right direction as to the
technologies/SDKs I need to use? Specifically:

a) Client: How to gather the current login information and use it to
authenticate against my WS.
b) WS: How to authenticate the user against Active Directory?

Thanks in advance!

Re: WS and Windows Authentication Jimmy
12/12/2005 5:40:22 PM
Thanks for your reply.

How do I access the user information from within the Web Service class?

Thanks!

[quoted text, click to view]

Re: WS and Windows Authentication Jimmy
12/12/2005 6:25:47 PM
Thanks again.

One more little problem:

I set the properties as you said in WebConfig.ini. Also, I set the website
in IIS to "Integrated Windows Security". But as soon as I remove "allow
anonymous access", I get an "Unauthorized" exception on the client when i
call on a method, even though it is running under an authenticated domain
user.

Help?

Thanks!

[quoted text, click to view]

Re: WS and Windows Authentication Jimmy
12/12/2005 6:38:21 PM
OK, I got it. I forgot to assign default credentials. Thanks for your
help!


[quoted text, click to view]

AddThis Social Bookmark Button