您的位置:首页 > 编程语言 > ASP

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.

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: