Article ID: 323176 - Last Review: May 18, 2007 - Revision: 4.4 How to implement Windows authentication and authorization in ASP.NETThis article was previously published under Q323176 On This PageSUMMARYThis step-by-step article describes how to implement Windows
authentication and authorization in an ASP.NET application. To use the built in security of Windows and ASP.NET, implement Windows authentication and authorization on groups and users. To use Windows authentication, you must adjust settings in both Microsoft Internet Information Services (IIS) and the ASP.NET application Web.config file. Requirements
Authentication and authorizationWindows authentication and Windows authorization are two terms that are frequently interchanged. However, they do not have the same meaning. Windows authentication permits the recipient to determine the user's identity. Windows authorization determines the resources to which a user may gain access.Configure Web application for Windows authenticationTo configure your Web application for Windows authentication, follow these steps:
Configure the ASP.NET applicationAfter you configure the IIS Web site for Integrated Windows Authentication, you must configure the ASP.NET application to recognize authenticated users. To do this, you must change the Web.config file. In the Web.config file, locate the <authentication> tag, and then set the mode attribute to Windows, as in the following example:Test authenticationTo test your Windows authentication setting, follow these steps:
Restrict accessIn ASP.NET, you set authorization to the application by adding settings in the Web.config file. You can specify which users or groups are permitted to have access to what resources as follows:
REFERENCES
For more information about an ASP.NET security and configuration overview, click the following article numbers to view the articles in the Microsoft Knowledge Base:
306590
(http://support.microsoft.com/kb/306590/
)
ASP.NET security overview
307626
(http://support.microsoft.com/kb/307626/
)
ASP.NET configuration overview
For more information about authentication and
authorization elements, visit the following Microsoft Web sites:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfauthenticationsection.asp
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfauthenticationsection.asp)
http://msdn2.microsoft.com/en-us/library/8d82143t(vs.71).aspx
(http://msdn2.microsoft.com/en-us/library/8d82143t(vs.71).aspx)
http://msdn.microsoft.com/msdnmag/issues/02/04/ASPSec/default.aspx
(http://msdn.microsoft.com/msdnmag/issues/02/04/ASPSec/default.aspx)
| Article Translations
|

Back to the top
