How to integrate custom security policy into Windows domain authentication
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.
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.
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Configure web.config.
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)