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.

 Run below in command line to unlock the section. By default it's locked in IIS7.
%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的更多相关文章

  1. [转]ASP.NET应用程序生命周期趣谈(五) IIS7瞎说

    Ps:建议初学者在阅读本文之前,先简要了解一下之前的几篇文章,以便于熟悉本文提到的一些关于IIS6的内容,方便理解.仅供参考. PS:为什么叫瞎说呢?我觉得自己理解的并不到位,只能是作为一个传声筒,希 ...

  2. IIS7 全新管理工具AppCmd.exe的命令使用实例分享

    IIS 7 提供了一个新的命令行工具 Appcmd.exe,可以使用该工具来配置和查询 Web 服务器上的对象,并以文本或 XML 格式返回输出. 下面是一些可以使用 Appcmd.exe 完成的任务 ...

  3. 发布Restful服务时出现IIS 指定了身份验证方案错误时的解决方案(IIS specified authentication schemes)

    发布RESTful服务,当访问.svc文件时出现如下错误时: IIS 指定了身份验证方案“IntegratedWindowsAuthentication, Anonymous”,但绑定仅支持一种身份验 ...

  4. Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍)

    原文:Zend Framework 2参考Zend\Authentication(Zend\Authentication介绍) Zend\Authentication组件提供了认证接口和具体的通用的认 ...

  5. 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 ...

  6. IIS7安装场景对照表

    原文 IIS7安装场景对照表 Default Server Install Components Server Manager Update Name Static Content IIS-Stati ...

  7. IIS7中 ASP.NET授权功能如何实现对静态文件的控制

    IIS7中 ASP.NET授权功能如何实现对静态文件的控制 前序 .net提供了3种用户认证的方式,分别是Windows,Forms,Passport.这几种形式的定义可以在网站根目录下Web.con ...

  8. IIS7 开发与 管理 编程 之 Microsoft.Web.Administration

    一.引言: 关于IIS7 Mocrosoft.Web.Administration  网上这方面详细资料相对来说比较少,大家千篇一律的(都是一篇翻译过来的文章,msdn 里面的实列没有).前段做了一个 ...

  9. 编程中检查IIS7组件的安装情况

    http://learn.iis.net/page.aspx/135/discover-installed-components/说明:ASP.NET网络应用程序在IIS7上部署的时候,经常会要求预装 ...

随机推荐

  1. 20165330 2017-2018-2 《Java程序设计》第6周学习总结

    课本知识总结 第八章 常用实用类 String类 String对象 构造方法: 使用String类声明对象并创建对象 String s = new String("we are studen ...

  2. Elasticsearch 监控插件安装(elasticsearch-head与Kibana)

    摘要 安装Elasticsearch插件Head与Kibana 版本 elasticsearch版本: elasticsearch-2.3.4 elasticsearch-head版本: 2.x(支持 ...

  3. 干货 | 蚂蚁金服是如何实现经典服务化架构往 Service Mesh 方向的演进的?

    干货 | 蚂蚁金服是如何实现经典服务化架构往 Service Mesh 方向的演进的? https://www.sohu.com/a/235575064_99940985 干货 | 蚂蚁金服是如何实现 ...

  4. PXE,ipmi,bare metal

    IPMI(Intelligent Platform Management Interface)是一个智能平台管理接口. 用户可以利用IPMI 监视服务器等设备的物理特征,如各部件的温度.电压.风扇工作 ...

  5. 算法大神之路——排序

    从今天开始,给自己立下一个目标,每天晚上写一篇算法与数据结构的博客,用来给自己以后的算法工程师的目标铺路! 今天晚上就以算法里面的排序,作为自己的第一章节吧. 排序,就是讲一组数据,按照特定的规则去调 ...

  6. Python笔记-进程Process、线程Thread、上锁

    1.对于操作系统来说,一个任务就是一个进程(Process).比如打开一个浏览器就是启动一个浏览器进程,打开一个记事本就启动了一个记事本进程. 2.在一个进程内部,要同时干多件事,就需要同时运行多个“ ...

  7. leetcode_Basic Calculator II

    题目: Implement a basic calculator to evaluate a simple expression string. The expression string conta ...

  8. 二叉树的先序、中序、后序和中序遍历——Java实现

    package treeTraverse; /** * 定义一个树的结点类 */ public class Node { private int data; private Node leftChil ...

  9. PHP面试专用笔记精简版

    [PHP笔记] 1.require 遇到即包含文件,require_once 只包含一次.require 遇到错误会终止,一般放在程序的最前面:include遇到错误会继续执行,一般放在流程控制语句中 ...

  10. Xcode8免证书生产IPA打包文件

    免证书生产IPA打包文件   修改Xcode配置文件: 关闭Xcode.然后打开“其他-终端”,就是命令行工具 cd /Applications/Xcode.app/Contents/Develope ...