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] "Jimmy" wrote:
> 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!
>
>
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] "Jimmy" wrote:
> Thanks for your reply.
>
> How do I access the user information from within the Web Service class?
>
> Thanks!
>
> "GCR" <GCR@discussions.microsoft.com> wrote in message
> news:56CD8D8E-0CA3-4AC0-AF8C-5CDE8D5E05E0@microsoft.com...
> > 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.
> >
> > "Jimmy" wrote:
> >
> >> 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!
> >>
> >>
> >>
>
>
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] "Jimmy" wrote:
> 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!
>
> "GCR" <GCR@discussions.microsoft.com> wrote in message
> news:C4F6F775-FFF5-4556-8006-47ECFDDC801D@microsoft.com...
> > 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.
> >
> > "Jimmy" wrote:
> >
> >> Thanks for your reply.
> >>
> >> How do I access the user information from within the Web Service class?
> >>
> >> Thanks!
> >>
> >> "GCR" <GCR@discussions.microsoft.com> wrote in message
> >> news:56CD8D8E-0CA3-4AC0-AF8C-5CDE8D5E05E0@microsoft.com...
> >> > 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.
> >> >
> >> > "Jimmy" wrote:
> >> >
> >> >> 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!
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
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!
Thanks for your reply.
How do I access the user information from within the Web Service class?
Thanks!
[quoted text, click to view] "GCR" <GCR@discussions.microsoft.com> wrote in message
news:56CD8D8E-0CA3-4AC0-AF8C-5CDE8D5E05E0@microsoft.com...
> 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.
>
> "Jimmy" wrote:
>
>> 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!
>>
>>
>>
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] "GCR" <GCR@discussions.microsoft.com> wrote in message
news:C4F6F775-FFF5-4556-8006-47ECFDDC801D@microsoft.com...
> 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.
>
> "Jimmy" wrote:
>
>> Thanks for your reply.
>>
>> How do I access the user information from within the Web Service class?
>>
>> Thanks!
>>
>> "GCR" <GCR@discussions.microsoft.com> wrote in message
>> news:56CD8D8E-0CA3-4AC0-AF8C-5CDE8D5E05E0@microsoft.com...
>> > 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.
>> >
>> > "Jimmy" wrote:
>> >
>> >> 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!
>> >>
>> >>
>> >>
>>
>>
>>
OK, I got it. I forgot to assign default credentials. Thanks for your
help!
[quoted text, click to view] "Jimmy" <NoSpam> wrote in message
news:uZCS%23nz$FHA.292@TK2MSFTNGP14.phx.gbl...
> 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!
>
> "GCR" <GCR@discussions.microsoft.com> wrote in message
> news:C4F6F775-FFF5-4556-8006-47ECFDDC801D@microsoft.com...
>> 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.
>>
>> "Jimmy" wrote:
>>
>>> Thanks for your reply.
>>>
>>> How do I access the user information from within the Web Service class?
>>>
>>> Thanks!
>>>
>>> "GCR" <GCR@discussions.microsoft.com> wrote in message
>>> news:56CD8D8E-0CA3-4AC0-AF8C-5CDE8D5E05E0@microsoft.com...
>>> > 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.
>>> >
>>> > "Jimmy" wrote:
>>> >
>>> >> 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!
>>> >>
>>> >>
>>> >>
>>>
>>>
>>>
>
>
Don't see what you're looking for? Try a search.