Using anonymous and basic authentication in the same folder under IIS7

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 15:01:32

check this out Did you know: Enable File Level Authentication in IIS 7 / 7.5

you can manually set the Authentication by go to the Content View -> right click on the file and click "Switch to Features View"

optionally, we can directly add the authentication for individual web pages in the applicationHost.config file

<location path="Default Web Site/iisstart.htm">
    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="true" />
                <basicAuthentication enabled="false" />
                <windowsAuthentication enabled="false" />
            </authentication>
        </security>
    </system.webServer>
</location>
<location path="Default Web Site/welcome.png">
    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="false" />
                <basicAuthentication enabled="true" />
                <windowsAuthentication enabled="false" />
            </authentication>
        </security>
    </system.webServer>
</location>

Regards, Vivek.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!