授权匿名用户目录IIS 7.5? [英] Authorize a directory for anonymous users IIS 7.5?

查看:118
本文介绍了授权匿名用户目录IIS 7.5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图添加目录在IIS 7.5匿名访问。它的工作原理下的Web开发,但不是IIS 7.5

I'm trying to add a directory for anon access in IIS 7.5. It works under Web Dev but not IIS 7.5

我目前使用这个web.config文件在目录中。这是样式表目录:

I'm currently using this web.config in the directory. This is a directory with style sheets:

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->

    <configuration>
        <appSettings/>
        <connectionStrings/>
        <system.web>
            <authorization>

                <allow users="*" />

            </authorization>

        </system.web>
    </configuration>

更新:

我去了文件夹,并验证下,我从IIS_USR改为匿名身份验证到池中。这似乎有正确的。

I've went to the folder and under Authentication, I've changed anonymous authentication from IIS_USR to pool. This seems to have correct it.

我将奖励任何人谁提供了理解此设置一个很好的解释和资源。此外,如何在全球范围内应用这将是很好的了解 - 对所有文件夹

I will reward anyone who provides a very good explanation and resources for understanding this setting. Also, how to apply it globally would be good to know -- for all folders.

推荐答案

既然你回答了你自己的问题,下面是可能有助于解释

Since you answered your own question, here is the explanation that might help

与谁IIS将提供资源,以授权交易。这些资源,然而,有他们自己的安全,因为它们只是文件的文件系统上。

Authorization deals with who IIS will offer resources to. Those resources, however, have their own security as they are just files on a file system.

在确定IIS将如何识别用户的请求,其接受后,因为它超越访问/外部资源来IIS。在配置助攻认证元素

The Authentication element in the config assists in determining how IIS will identify a user's requests after its accepted and as it accesses resources beyond/external to IIS.

这是在为您的服务器applicationHost.config文件设置在网站级别,一般。它可以,如果正确设置,可以在网站级别覆盖。

This is set at the site level, typically in the applicationHost.config file for your server. It can, if properly setup, be overridden at the site level.

IIS.net网页:

IIS.net pages about this:

<一个href=\"http://www.iis.net/ConfigReference/system.webServer/security/authorization/add\">http://www.iis.net/ConfigReference/system.webServer/security/authorization/add

<一个href=\"http://www.iis.net/ConfigReference/system.webServer/security/authentication/anonymousAuthentication\">http://www.iis.net/ConfigReference/system.webServer/security/authentication/anonymousAuthentication

你的UI做了什么的.config文件的版本是:

The .config version of what you did in the UI is:

<location path="/yourSite">
   <system.webServer>
      <security>
         <authentication>
            <anonymousAuthentication enabled="true" username="" />
          </authentication>
      </security>
   </system.webServer>
</location>

在不久的。 AUTH方法,用户名域是谁,当资源被访问IIS将模拟。如果不指定,则默认为使用该程序池的身份。

On the anon. auth method, the username field is who IIS will impersonate when resources are accessed. When you don't specify one, it defaults to use the identity of the apppool.

现在,至于为什么这个要紧......检查磁盘上的实际文件(的CSS)。如果这个固定的问题,这将意味着IUSR不具有访问来读取该文件。

Now, as to why this mattered ... check the actual file on disk (the .css). If this fixed the problem that would mean IUSR doesn't have access to read that file.

这篇关于授权匿名用户目录IIS 7.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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