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.

  1. Open IIS and right click our website.
  2. Click "Properties" menu to open "Properties" window.
  3. Select "Directory Security" tab.
  4. Click "Edit..." button to open "Authentication Methods" window.
  5. Clear "Enable anonymous access".
  6. Check "Integrated Windows Authentication" box.
  7. Click "OK" button to close all opened windows.

Write following codes.

C# code

Configure web.config.

Web.config

你可能感兴趣的:(Authentication)