Mixed Authentication in IIS7
Process for Mixed Authentication
Configuration in IIS7 Integration Mode
There're some breaking changes in IIS 7, so the configuration is different from that we done on IIS6.
1. Unlock Authentication Section.
%windir%\system32\inetsrv\appcmd unlock config /section:anonymousAuthentication
%windir%\system32\inetsrv\appcmd unlock config /section:windowsAuthentication
2. Add below in Web.Config
Pay attention to the responseMode attribute of error redirect section. It must be "File" instead of "ExecuteURL" or "Redirect"
<location path="WinLogin.aspx">
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
</authentication>
</security>
<httpErrors>
<remove statusCode="403" subStatusCode="-1" />
<remove statusCode="401" subStatusCode="-1" />
<error statusCode="401" prefixLanguageFilePath="" path="redirect401.htm" responseMode="File" />
<error statusCode="403" prefixLanguageFilePath="" path="redirect401.htm" responseMode="File" />
</httpErrors>
</system.webServer>
</location>
<location path="WebLogin.aspx">
<system.web>
<authorization>
<allow users="?,*" />
</authorization>
</system.web>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="false" />
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
<location path="Redirect401.htm">
<system.web>
<authorization>
<allow users="?,*" />
</authorization>
</system.web>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="false" />
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
<location path="Images">
<system.web>
<authorization>
<allow users="?,*" />
</authorization>
</system.web>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="false" />
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
3. Make sure the Anonymous user identity can access web site directory
By default the identify is "IUSR", need to grant read access to the web site directory.
Mixed Authentication in IIS7的更多相关文章
- [转]ASP.NET应用程序生命周期趣谈(五) IIS7瞎说
Ps:建议初学者在阅读本文之前,先简要了解一下之前的几篇文章,以便于熟悉本文提到的一些关于IIS6的内容,方便理解.仅供参考. PS:为什么叫瞎说呢?我觉得自己理解的并不到位,只能是作为一个传声筒,希 ...
- IIS7 全新管理工具AppCmd.exe的命令使用实例分享
IIS 7 提供了一个新的命令行工具 Appcmd.exe,可以使用该工具来配置和查询 Web 服务器上的对象,并以文本或 XML 格式返回输出. 下面是一些可以使用 Appcmd.exe 完成的任务 ...
- 发布Restful服务时出现IIS 指定了身份验证方案错误时的解决方案(IIS specified authentication schemes)
发布RESTful服务,当访问.svc文件时出现如下错误时: IIS 指定了身份验证方案“IntegratedWindowsAuthentication, Anonymous”,但绑定仅支持一种身份验 ...
- Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍)
原文:Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍) Zend\Authentication组件提供了认证接口和具体的通用的认 ...
- Migration of ASP.NET app from IIS6 to IIS7 (7.5)
For many of us familiar problem. You developing applications under IIS6 and you're about to move the ...
- IIS7安装场景对照表
原文 IIS7安装场景对照表 Default Server Install Components Server Manager Update Name Static Content IIS-Stati ...
- IIS7中 ASP.NET授权功能如何实现对静态文件的控制
IIS7中 ASP.NET授权功能如何实现对静态文件的控制 前序 .net提供了3种用户认证的方式,分别是Windows,Forms,Passport.这几种形式的定义可以在网站根目录下Web.con ...
- IIS7 开发与 管理 编程 之 Microsoft.Web.Administration
一.引言: 关于IIS7 Mocrosoft.Web.Administration 网上这方面详细资料相对来说比较少,大家千篇一律的(都是一篇翻译过来的文章,msdn 里面的实列没有).前段做了一个 ...
- 编程中检查IIS7组件的安装情况
http://learn.iis.net/page.aspx/135/discover-installed-components/说明:ASP.NET网络应用程序在IIS7上部署的时候,经常会要求预装 ...
随机推荐
- [genome shell]标题栏优化
参考地址:https://wiki.archlinux.org/index.php/GNOME_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#.E4.BB.8E.E5. ...
- python - while语句/pass/死循环/break/continue/while...else...
程序开发的原则: 写重复代码 是可耻的行为: 1.while 条件: 执行代码... #循环打印0-100count = 0 while count <= 100: print("lo ...
- 安装串口设备驱动时遇到 Windows 无法验证此设备所需的驱动程序的数字签名。最近的硬件或软件更改安装的文件可能未正确签名或已损坏,或者可能是来自未知来源的恶意软件. 问题该如何处理?
win7 系统直接在 cmd 命令行中输入以下语句,重启电脑后重新安装驱动即可. BCDEDIT -SET LOADOPTIONS DISABLE_INTEGRITY_CHECKS BCDEDIT - ...
- new Option() 创建一个option标签
//add() 方法用于向 <select> 添加一个 <option> 元素. //new Option() 创建一个option标签 school.add(new Opti ...
- 借助 Django 的 smart_str 和 smart_unicode 进行编码转换(转)
原文:http://www.dirk.sh/diary/using-django-smart_str-smart_unicode/ Django 为字符编码的转换提供了非常简洁的方法: 1.djang ...
- python类可以任意添加属性
python类可以任意添加属性 class A(object): def __init__(self): self.name = "zhangsan" self.age = 18 ...
- (0.2.1)mysql数据库环境-操作系统配置
目录 1.基于Linux平台的Mysql项目场景介绍 2.mysql数据库运行环境准备-最优配置 2.1.如何查看官方文档了解环境要求 2.2.安装虚拟机环境与操作系统 2.3.操作系统最优配置9大步 ...
- Java-小技巧-005-double类型保留两位小数4种方法
4种方法,都是四舍五入,例: import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberF ...
- 【Spring Task】定时任务详解实例-@Scheduled
Spring的任务调度,采用注解的形式 spring的配置文件如下,先扫描到任务的类,打开spirng任务的标签 <beans xmlns="http://www.springfram ...
- oracle的统计信息的查看与收集
查看某个表的统计信息 SQL> alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'; Session altered. SQL&g ...