Adding entry Causes 500 for Other Static Content on IIS Express

前端 未结 3 650
生来不讨喜
生来不讨喜 2020-12-29 02:30

I\'m using Visual Studio 2012 with Update 2 and IIS Express.

When I add a record to the staticContent section, all other static content (.js, .css, .jpg, etc) retur

3条回答
  •  暖寄归人
    2020-12-29 02:48

    Behavior of system.webServer/staticContent/mimeMap element has changed in IIS 7.0 and apparently one has to list all types explicitly to have them returned properly.

    Here is a description from IIS configuration documentation:

    Note: IIS 7 will not return file types that are not added to the element or that have mappings in the element by default. This behavior prevents unauthorized access to files that do not have mappings in the IIS 7 configuration settings.

提交回复
热议问题