在IIS7在同一文件夹中使用匿名和基本身份验证 [英] Using anonymous and basic authentication in the same folder under IIS7

查看:239
本文介绍了在IIS7在同一文件夹中使用匿名和基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Web服务在IIS7(W2008)一个拥有的WinForms客户端

I have a have Winforms client that uses Web services on a IIS7 (W2008)

客户端将首先访问first.asmx页匿名aaccess,然后访问second.asmx与基本身份验证(通过SSL)。这在IIS6在那里我可以设置第一个文件有匿名身份验证,第二个文件有基本身份验证工作正常。

The client will first access a first.asmx page with anonymous aaccess, then access second.asmx with basic authentication (over SSL). This works fine in IIS6 where I can set first file to have anonymous authentication and the second file to have basic authentication.

当我移动到IIS7似乎是具有在同一个虚拟文件夹两种不同的认证方式有问题。有谁知道这是怎么打算的?

When I move to IIS7 there seems to be a problem having two different authentication modes in the same virtual folder. Does anyone know how this is intended to work?

我曾想过使用ACL解决这个,但它似乎棘手..或者将匿名first.asmx文件到自己的虚拟文件夹。有什么想法?

I have thought about fixing this with ACLs but it seems tricky.. or maybe move the anonymous first.asmx file to its own virtual folder. Any thoughts?

问候 弗雷德里克

推荐答案

检查了这一点 <一href="http://www.dotnetscraps.com/dotnetscraps/post/Did-you-know-Enable-File-Level-Authentication-in-IIS-7-75.aspx">Did你知道:启用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"

或者,我们可以直接在个人的applicationHost.config网页添加认证文件

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.

这篇关于在IIS7在同一文件夹中使用匿名和基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆