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. git学习(4)远程库和分支管理

    git学习(4)远程库和分支管理 1.1建立本地git库和远程库联系 我使用的是GitHub上的库,首先在GitHub上新建一个库,在建立与远程库的联系之前需要建立ssh key.建立ssh key可 ...

  2. 百度jQuery库

    <script src="http://apps.bdimg.com/libs/jquery/1.11.1/jquery.js"></script>

  3. 新团建立时间 timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

    w 不根据当前时间戳更新. `wtime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,

  4. log4cpp简单示例

    log4cpp简单示例 下载地址 Sample.cpp #include <iostream> #include <log4cpp/FileAppender.hh> #incl ...

  5. chrome 因js死循环卡住

    chrome因js死循环卡住的解决方法: top命令查看chrome的pid kill -9 pid 杀死整个chrome进程(所有网页都关闭)

  6. 【opencv】cv::Mat转std::vector<cv::Point2d> (注意两容器中数据类型的一致性)

    获取cv::Mat大小: mymat.size() 获取cv::Mat指定位置的值:需指定数据类型,且注意数据类型应与存入时的数据类型一致,否则会导致不抛出异常的数据错误 mymat.at<,i ...

  7. VirtualBox network / study environment setup for RHEL

    I re-visited the RHEL study material and setup the environment again, noted down the procedure. 1, c ...

  8. srs(srs-librtmp推送h264原始数据)

    1.下载最新srs源码 https://github.com/ossrs/srs/releases 2.编译(进入~/srs-2.0-r4/trunk目录) ./configure --with-li ...

  9. 浅谈Spark2.x中的Structured Streaming

    在Spark2.x中,Spark Streaming获得了比较全面的升级,称为Structured Streaming,和之前的很不同,功能更强大,效率更高,跟其他的组件整合性也更好. 连续应用程序c ...

  10. ios极光推送快速集成教程

    内容中包含 base64string 图片造成字符过多,拒绝显示