How to integrate custom security policy with Windows domain authentication in ASP.NET
2009-03-02 09:36
796 查看
Generally, the ASP.NET built in Windows domain authentication is not sufficient. For example, we often need to use Windows domain authentication with database information. Here is my example which shows how to do this in ASP.NET.
Click "Properties" menu to open "Properties" window.
Select "Directory Security" tab.
Click "Edit..." button to open "Authentication Methods" window.
Clear "Enable anonymous access".
Check "Integrated Windows Authentication" box.
Click "OK" button to close all opened windows.
<httpModules>
<add name="MyAuthenticationModule" type="MyAuthenticationModule"/>
</httpModules>
Configure IIS 6.0 to support our custom Windows domain authentication.
Open IIS and right click our website.Click "Properties" menu to open "Properties" window.
Select "Directory Security" tab.
Click "Edit..." button to open "Authentication Methods" window.
Clear "Enable anonymous access".
Check "Integrated Windows Authentication" box.
Click "OK" button to close all opened windows.
Write following codes.
Web.config<httpModules>
<add name="MyAuthenticationModule" type="MyAuthenticationModule"/>
</httpModules>
相关文章推荐
- How to integrate custom security policy into Windows domain authentication
- Redirecting to custom 401 page when "Access denied" occures within an ASP.NET application with Windows authentication
- How to customize authentication to my own set of tables in asp.net web api 2?
- how to use Form Authentication in ASP.NET.
- How to create custom html helper in Asp.net MVC 3 or 4
- How To Implement Forms-Based Authentication in Your ASP.NET Application by Using C# .NET
- [转][ASP.NET]How to easily insert row in GridView with SqlDataSource?
- [reproduce]How to Create Domain in Windows Server 2012.
- How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET(利用Ado.net导出到Excel)
- How to build Multi-Language Web Sites with ASP.NET 2.0 and VS.Net 2005
- How to Hook Up a VS.NET 2005 Solution With CruiseControl.NET in a Few Minutes
- How to detect Windows 64 bit platform with .net?
- How To: Use Forms Authentication with SQL Server in ASP.NET 2.0
- HOW TO: Set a Windows Hook in Visual C# .NET
- How to hijack domain name in windows - 如何实现 Windows 本地域名劫持
- Working with Windows Workflow Foundation in ASP.NET
- How to Use Lucene.NET with Windows Azure SQL Database
- How to Share a Theme With All Users in a Windows 7 Computer?
- How to set custom JsonSerializerSettings for Json.NET in MVC 4 Web API?
- How to build Multi-Language Web Sites with ASP.NET 2.0 and VS.Net 2005