رفع مشکل نمایش ندادن تصاویر webp در IIS خطای HTTP Error 404.3

mohsen2 سال قبل
ارسال شده در
mohsen

برای رفع مشکل خطای زیر باید MIME type تصاویر webp را به Web.config اضافه کنیم.

      HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
    

تنظیمات زیر مشکل را حل می کند:

      <configuration> 
    <system.webServer> 
        <staticContent> 
            <mimeMap fileExtension=".webp" mimeType="image/webp" /> 
        </staticContent> 
    </system.webServer> 
</configuration>
    

مشکل من در IIS Express بود. در IIS می توان از طریق برنامه مدیریت IIS این کار را در بخش Mime types انجام داد.

رای
0
ارسال نظر
مرتب سازی:
اولین نفری باشید که نظر می دهید!