代码之家  ›  专栏  ›  技术社区  ›  LargeDachshund

IISWeb.config文件-确保检测到没有文件扩展名的文件

  •  0
  • LargeDachshund  · 技术社区  · 6 年前

    在我的web.config文件,但这不起作用:

    `<configuration>
         <system.webServer>
            <staticContent>
               <mimeMap fileExtension="*" mimeType="text/plain" />
            </staticContent>
                                  .
                                  . 
                                  .`
    

    @莱克斯利,回答了这个问题!下面是我如何更新我的web.config文件文件(如下)。

    `<configuration>
         <system.webServer>
            <staticContent>
               <mimeMap fileExtension="." mimeType="text/plain" />
            </staticContent>
                                  .
                                  . 
                                  .`
    
    1 回复  |  直到 6 年前
        1
  •  0
  •   Lex Li    6 年前

    从评论中复制。

    对于没有扩展名的文件,必须使用 . mimeMap 标记为 fileExtension

    当我写信的时候 the blog post