Groups | Blog | Home
all groups > asp.net > june 2004 >

asp.net : Windows authentication and application data


Shimon Sim
6/12/2004 10:55:26 PM
Hi
I would like users of my application to user Windows authentication(I have
ASP.NET application) so user doesn't have to remember another
username/password pair.The problem is that context of application is heavily
dependent on user identity. Different users will get to view different items
in the lists. I also have some information about users in my application
like e-mail that is used by application for notifications (and users can
edit it). Can I map Windows Identity information to my data and if it is
possible how can it be done?
Thanks,
Shimon

Trevor Benedict R
6/13/2004 6:26:13 AM
Basically you need to do the following

1. Use Basic Authentication in IIS.
http://www.microsoft.com/technet/prodtechnol/windows2000serv/technologie
s/iis/maintain/featusability/authmeth.mspx

2. Configure your ASP.NET application to Impersonate by setting the
<identity impersonate="true"/> (check the exact syntax and use Windows
authtication in web.config
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide
/html/cpconaspnetimpersonation.asp

3. Then use Context.User.Identity.Name to get the domain name and User
ID

If you are talking to Active Directory then you might want to refer to
this
http://groups.google.com/groups?q=Context.User.Identity.Name&hl=en&lr=&i
e=UTF-8&selm=0c9601c31c16%248d628c50%24a001280a%40phx.gbl&rnum=1



Trevor Benedict R
Microsoft Certified Solution Developer

*** Sent via Devdex http://www.devdex.com ***
Shimon Sim
6/13/2004 10:25:10 AM
Thanks,
Shimon
[quoted text, click to view]

AddThis Social Bookmark Button