我的服务器中有文件可供下载。我正在使用IIS6.0。当我尝试下载pdf文件时,它说Http 404 file not found错误。但是我在服务器上有文件。谷歌搜索时,我发现我们需要启用mime类型。谁能解释一下这是什么并且摆脱这个问题
这很容易理清
在此IIS实例托管的所有站点上全局启用
Open IIS Manager
Right Click the server name
Select properties
Click the MIME Types button
Click New
Extension is .pdf
MIME type is application/pdf
Run Code Online (Sandbox Code Playgroud)
要将其仅添加到IIS实例上的单个站点
Open IIS Manager
Right Click the sites name
Select Properties
Choose the 'HTTP Headers' tab
Click the MIME Types button
Click New
Extension is .pdf
MIME type is application/pdf
Run Code Online (Sandbox Code Playgroud)