zoukankan      html  css  js  c++  java
  • IIS安装及IIS无权访问解决方法(Failed to access IIS metabase解决)

    Failed to access IIS metabase解决方案:

    原因:IIS没有注册

    解决办法:在CMD中进入目录C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727,运行aspnet_regiis

    1、aspnet_regiis -ga administrator(administrator为当前用户)

    C:\Documents and Settings\Administrator>cd c:\\windows\\microsoft.net\\framework\\v2.0.50727

    2、aspnet_regiis -i (注册IIS)

    3、iisreset /noforce (重启IIS)

    以下是安装方法及IIS相关问题(来源于网络):

    (Win2000 使用IIS5.0  WinXP使用 IIS5.1)
    xp iis5.1安装包,附安装说明。;
    IIS5.1安装包适合用于windows xp专业版(xp家庭版没这功能,大部分用的盗版xp都是专业版,OEM版一般为家庭版)
    很多人说安装包没用,没安装文件,我晕,不是这样安装的,下面我来说一下iis5.1的大概目录方法:
    1:控制面板/添加或删除程序/删除window组件
    2:选择Internet信息服务(IIS),点下一步往下安装即可.
    3:安装过程一般出提示要你插入xp光盘,大家不用管它,点浏览到下载的目录中即可,此安装包100%有效]
     

    一步:IIS的安装

    A.在控制面板中选择“添加/删除程序”,在出现的对话框中选择“添加/删除Windows组件”(如图1)。

    B.在出现的复选框中选择安装Internet信息服务(IIS)(如图2),这一组件约需19MB的空间。

    C.提示要你插入xp光盘,大家不用管它,点浏览到下载的目录中即可.

    安装过程中可能还会弹出提示框,需要光盘中的文件,点击浏览,就会有默认文件,选中它就可以。

    IIS 安装 无权访问解决方法 Failed to access IIS metabase解决 - raku - raku raku!
     
    IIS 安装 无权访问解决方法 Failed to access IIS metabase解决 - raku - raku raku!
     

    第二步:IIS中Web服务器的基本配置

    IIS中Web服务器的基本配置主要包括如下几部分:

    A.打开IIS服务器的配置窗口,选择“开始”→“程序”→“管理工具”→“Internet服务管理器”,或者“选择”→“控制面板”→

    “管理工具”→“Internet服务管理器”也可,。

    B.在打开的窗口中鼠标右击“默认Web站点”,选择“属性”菜单。

    C.在出现的“默认Web站点属性”窗口中,选择“主目录”标签,用以设置Web内容在硬盘中的位置,默认目录为

    “C:\Inetpub\Wwwroot”,你可根据需要自己设置
    IIS 安装 无权访问解决方法 Failed to access IIS metabase解决 - raku - raku raku!
     


    D.在属性窗口处选择“文档”标签,设置自己默认的首页网页名称,例如“Myfirstweb.htm”,将其添加并移动到列表

    的最顶端


    E.确认默认的Web站点是否已经启动,如果没有可以鼠标右键点击“默认Web站点”,选择“启动”,在打开的IE地址栏

    中键入本机的IP地址,即可看到自己指定的主页已经开始在Internet上发布了。

    这里只是介绍IIS最基本的设置选项,大家还可以按照需要去具体设置上面提到的“默认Web站点属性”,通过它来配

    置IIS的安全和其他一些参数。


    ==========================================================================================

    无权访问解决方法:

    1 可以在IIS的默认网站下:把相应web应用程序的属性-->目录安全性-->访问控制权限-->启用匿名访问给勾上
       如果强制需要输入用户名 IUSER_PC-201007081813  后面那一串是我的本机号码
       本机号码可以在  高级--->立即查找中 最下面的名称里面就可以看到自己的号码
    IIS 安装 无权访问解决方法 Failed to access IIS metabase解决 - raku - raku raku!
     
    2  对于根目录,可能是由于你没有配置默认页面。。。
    3 如果不能,说明配置不正确,本机IIS没有监视80端口。查看本机80端口是否被监听,可以运行cmd进入命令行窗口,然后执行netstat -an|more,查找local address列是否有0.0.0.0:80这一项,对应的state列是否是LISTENING状态?不过不是那就是没有配置好
    4 在本地安全策略->本地策略->用户权利指派
    有一条拒绝从网络访问本计算机,你看下里面限定的用户是否有everyone或者IIS用户,再看看从网络访问本计算机里面是否有everyone


    ========================================================================
    微软官方解决方案:您无权访问解决
    注意:Windows 集成身份验证、Windows NT 质询/响应 (NTCR) 和 Windows NT LAN 管理器 (NTLM) 是相同的,在

    本文中作为同义词来使用。

        * 当您使用 Windows 集成身份验证(Microsoft Windows NT 质询/响应)时,Internet Explorer 会提示输

    入密码。

          要使 Internet Explorer 自动验证用户登录和密码并保持安全性,必须满足以下条件:
              o 必须在 IIS 的 Web 站点属性中启用 Windows 集成身份验证,也称为 Windows NT 质询/响应。首先

    尝试匿名身份验证,然后进行 Windows 集成身份验证、简要身份验证(如果适用),最后进行基本(明文)身份

    验证。
              o 客户端和 Web 服务器都必须在基于 Microsoft Windows NT 或基于 Microsoft Windows 2000 的同

    一个域内,或者在受信任的基于 Windows NT 或基于 Windows 2000 的不同域内(在这些域内可以授予用户帐户访

    问基于 IIS 的计算机资源的权限)。
              o 用户的浏览器必须是 Internet Explorer。Internet Explorer 是唯一支持 Windows 集成身份验证 

    (NTCR) 的浏览器。
              o Internet Explorer 必须把所请求的 URL 视为 Intranet(本地)。如果所请求的 URL 的计算机名

    称部分包含句点(如 http://www.microsoft.com 和 http://10.0.0.1),Internet Explorer 会假定在 

    Internet 中存在所请求的地址而不自动传递任何凭据。不包含句点的地址(如 http://webserver)被认为在 

    Intranet (本地);Internet Explorer 会自动传递凭据。唯一的例外是在 Internet Explorer 中的 Intranet 

    区域内包括的地址。
              o Internet Explorer 的 Intranet 区域的安全性设置必须设为“只在 Intranet 区域自动登录”。这是 

    Internet Explorer 的默认设置。有关 Internet Explorer 安全性区域的其他信息,请单击下面的文章编号,以

    查看 Microsoft 知识库中相应的文章:
                174360  (http://support.microsoft.com/kb/174360/EN-US/ ) 如何在 Internet Explorer 中使用

    安全区域
              o 请求 Web 页的用户必须具有访问该 Web 页以及该 Web 页中引用的所有对象的适当的文件系统 

    (NTFS) 权限。例如,一位用户可能对某个 Web 页具有完全控制权,但如果该 Web 页引用了位于某个安全文件夹

    中的图形,他仍会收到输入密码的提示。
        * 当您使用基本(明文)身份验证或简要身份验证时,Internet Explorer 会提示输入密码。

          当您使用基本(明文)身份验证或简要身份验证时,Internet Explorer 不会自动传递您的用户名和密码。

    因此,当您使用这几种身份验证方法时,您总是收到要求凭据的提示。
        * 在使用匿名身份验证时,Internet Explorer 提示输入密码。

          匿名身份验证从不提示您输入密码,因为 IIS 已经知道匿名帐户的用户名和密码。您收到输入密码的提示

    是因为 Internet Explorer 已经被强制使用匿名身份验证以外的其他身份验证方法。发生这种情况是因为匿名用

    户帐户(默认情况下是 IUSR_computername)没有获得对以下一个或多个项目的访问权:
              o 所请求的文件或 Web 页
              o 任何嵌入到该文件或 Web 页中的所请求的对象(例如图形)
              o 与所请求的文件或 web 页相关联的 ISAPI 扩展名(例如,.shtml 文件)



    =================================================================
    Failed to access IIS metabase解决 
    由于先安装NET 再安装IIS造成  重新装NET即可
    我的NET安装目录 
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    然后在CMD中输入 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727> aspnet_regiis –u
    卸载后再输入 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>  aspnet_regiis –i
    大功告成

    ================================================================= 
    virtual directory not being configured as an application in IIS. 解决

    路径设置不合理可能会出现这样的情况
    虚拟路径的设置 应该到该web.config所在的那一级文件夹,否则会有冲突,具体原因在后面
    EX:我的网站在D:\My Documents\Visual Studio 2008\Projects\WebSiteSQL1\PrecompiledWeb\WebSiteSQL1里面
    那么虚拟路径也应该设置为这个文件夹
    IIS 安装 无权访问解决方法 Failed to access IIS metabase解决 - raku - raku raku!


    Configuration Error

    Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

    解决方法:
    情况1:When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application.
    However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and
    may get the above error. The debug information you get as mentioned above, is applicable to this scenario.

    To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will
    automatically create the "application" using the virtual directory's name. Now the application can be accessed.

    当使用.net创建一个新的web程序时,通常会自动的创建虚拟目录并设置为网站程序。
    但是如果你手工创建虚拟目录而没有设置为网站程序,你就不能浏览网站的网页并出现上述的错误。

    右键单击“默认网站”->新建->虚拟目录,将虚拟目录指向程序所在处,设置网站程序,就可以访问了。

    情况2:
    When you have sub-directories in your application, you can have web.config file for the sub-directory. However, there are certain properties which cannot
    be set in the web.config of the sub-directory such as authentication, session state (you may see that the error message shows the line number where the
    authentication or sessionstate is declared in the web.config of the sub-directory). The reason is, these settings cannot be overridden at the sub-directory level
    unless the sub-directory is also configured as an application (as mentioned in the above point).

    Mostly we have the practice of adding web.config in the sub-directory if we want to protect access to the sub-directory files (say, the directory is admin and we
    wish to protect the admin pages from unathorized users).

    But actually, this can be achieved in the web.config at the application's root level itself, by specifing the location path tags and authorization, as follows:-

    <location path="Admin">
    <system.web>
    <authorization>
    <allow roles="administrators" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    However, if you wish to have a web.config at the sub-directory level and protect the sub-directory, you can just specify the Authorization mode as follows:-

    <configuration>
    <system.web>
    <authorization>
    <allow roles="administrators" />
    <deny users="*" />
    </authorization>
    </system.web>
    </configuration>

    Thus you can protect the sub-directory from unauthorized access.


    当你把web.config放在网站程序中的子文件夹时,有一些属性不能设置,如authentication, session state
    (错误信息显示子文件夹中web.config声明的authentication, session state 所在的行号)。
    原因是这些设置不能被子文件夹的权限覆盖(override),除非子文件夹本身被设置成网站程序。
    通常情况下我们希望把web.config放在子文件夹中来保护对子文件夹中文件的访问
    (假设目录是admin,我们希望保护admin里面的文件不被未授权的用户访问)

    实际上,当web.config在网站程序根目录时,也能做到,如下:
    <location path="Admin">
    <system.web>
    <authorization>
    <allow roles="administrators" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    如果你想把web.config放在子目录,可以这样设置:
    <configuration>
    <system.web>
    <authorization>
    <allow roles="administrators" />
    <deny users="*" />
    </authorization>
    </system.web>
    </configuration>

    这样可以做到保护子文件夹不被未授权的用户访问。
  • 相关阅读:
    使用top观察一进程的cpu历史占用情况
    djangoForm组件
    djangoAdmin组件
    js-metisMenu
    css-bootstrap
    flask环境安装
    python数据结构转换&格式化
    linux安装odbc for mysql
    json模块
    urllib模块
  • 原文地址:https://www.cnblogs.com/skylaugh/p/2086759.html
Copyright © 2011-2022 走看看