我正在运行一个Azure Web应用程序,在那里我将调用一个JSON文件,但当我尝试加载该文件时,我得到404.17。我已经尝试过更新这里概述的web.config,但当我这样做时,web.config会杀死我的网站,然后什么都不加载。我得到The page cannot be displayed because an internal server error has occurred.
的错误
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
</staticContent>
</system.webServer>
</configuration>
我还尝试了以下操作,这也使网站瘫痪。
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
</system.webServer>
</configuration>
我添加了asp.net扩展,我认为这为我解决了问题。