• IIS下浏览指定文件(如:web.config)


    具体步骤如下:

    1、快捷键:Ctrl + R

    2、输入:%windir%System32inetsrvconfigapplicationHost.config

    3、注销:fileExtensions节下的:<!--<add fileExtension=".config" allowed="false" /> --> 和 hiddenSegments 节下的<!-- <add segment="web.config" /> -->。具体如下:

     <requestFiltering>
      <fileExtensions allowUnlisted="true" applyToWebDAV="true">
                        <add fileExtension=".asa" allowed="false" />
                        <add fileExtension=".asax" allowed="false" />
                        <add fileExtension=".ascx" allowed="false" />
                        <add fileExtension=".master" allowed="false" />
                        <add fileExtension=".skin" allowed="false" />
                        <add fileExtension=".browser" allowed="false" />
                        <add fileExtension=".sitemap" allowed="false" />
                        <!--<add fileExtension=".config" allowed="false" /> -->
                        <add fileExtension=".cs" allowed="false" />
                        <add fileExtension=".csproj" allowed="false" />
                        <add fileExtension=".vb" allowed="false" />
                        <add fileExtension=".vbproj" allowed="false" />
                        <add fileExtension=".webinfo" allowed="false" />
                        <add fileExtension=".licx" allowed="false" />
                        <add fileExtension=".resx" allowed="false" />
                        <add fileExtension=".resources" allowed="false" />
                        <add fileExtension=".mdb" allowed="false" />
                        <add fileExtension=".vjsproj" allowed="false" />
                        <add fileExtension=".java" allowed="false" />
                        <add fileExtension=".jsl" allowed="false" />
                        <add fileExtension=".ldb" allowed="false" />
                        <add fileExtension=".dsdgm" allowed="false" />
                        <add fileExtension=".ssdgm" allowed="false" />
                        <add fileExtension=".lsad" allowed="false" />
                        <add fileExtension=".ssmap" allowed="false" />
                        <add fileExtension=".cd" allowed="false" />
                        <add fileExtension=".dsprototype" allowed="false" />
                        <add fileExtension=".lsaprototype" allowed="false" />
                        <add fileExtension=".sdm" allowed="false" />
                        <add fileExtension=".sdmDocument" allowed="false" />
                        <add fileExtension=".mdf" allowed="false" />
                        <add fileExtension=".ldf" allowed="false" />
                        <add fileExtension=".ad" allowed="false" />
                        <add fileExtension=".dd" allowed="false" />
                        <add fileExtension=".ldd" allowed="false" />
                        <add fileExtension=".sd" allowed="false" />
                        <add fileExtension=".adprototype" allowed="false" />
                        <add fileExtension=".lddprototype" allowed="false" />
                        <add fileExtension=".exclude" allowed="false" />
                        <add fileExtension=".refresh" allowed="false" />
                        <add fileExtension=".compiled" allowed="false" />
                        <add fileExtension=".msgx" allowed="false" />
                        <add fileExtension=".vsdisco" allowed="false" />
                        <add fileExtension=".rules" allowed="false" />
                    </fileExtensions>
                    <verbs allowUnlisted="true" applyToWebDAV="true" />
                    <hiddenSegments applyToWebDAV="true">
                        <!-- <add segment="web.config" /> -->
                        <add segment="bin" />
                        <add segment="App_code" />
                        <add segment="App_GlobalResources" />
                        <add segment="App_LocalResources" />
                        <add segment="App_WebReferences" />
                        <add segment="App_Data" />
                        <add segment="App_Browsers" />
                    </hiddenSegments>
                </requestFiltering>

    4、点击网站XXX,在右侧的IIS栏里,双击MIME类型项,在新打开的对话框中右侧(右击)点击添加,类型如:.config MIME类型如:xml/txt

    完毕后就可以浏览web.config了,浏览其他后缀步骤更简单。。。
  • 相关阅读:
    资深工程师为何否定这种单例模式
    C#经典面试题及答案【20090210更新】
    难道SQL的子查询就是鸡肋吗?
    转:WCF基础知识问与答
    针对分析单点登录(流程图与数据安全)提出的问题及解决方案
    老生常谈:装饰者模式
    我对IDisposable接口的理解
    log4net日志组件经验分享
    老生常谈:工厂模式兄弟姐妹
    探讨高访问量网站优化方案(从图片角度)
  • 原文地址:https://www.cnblogs.com/shenchao/p/3966640.html
Copyright © 2020-2023  润新知