1
我試圖創建一個站點地圖使用web.sitemap
當試圖查看站點地圖我有404.7 server error
我已經排序允許在web.config
文件擴展名但現在我有問題允許查看文件類型。這個錯誤告訴我做到以下幾點:查看XML網站地圖IIS Express
To set a MIME type, run the following command in the IIS Express install directory: appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
當我看我只看到XML配置文件的文件夾中。 有沒有辦法在web.config
中添加MIME類型?還是我必須做IIS的東西?
我只允許文件類型:
<fileExtensions allowUnlisted="true">
<remove fileExtension=".sitemap"/>
<add fileExtension=".sitemap" allowed="true"/>
</fileExtensions>