简体   繁体   English

HTTP错误404.3-在DotNet中找不到

[英]HTTP Error 404.3 - Not Found in DotNet

When I am requesting the json file using ajax from dotnet application I got this error: 当我从dotnet应用程序使用ajax请求json文件时,出现此错误:

HTTP Error 404.3 - Not Found HTTP错误404.3-找不到

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. 如果应下载文件,请添加MIME映射。

Please share the solution 请分享解决方案

 Implement below code in `web.config` file. Use the file extension that you want to fetch
 For Example: here is .json file

 <system.webServer>

 <staticContent>
    <remove fileExtension=".json" />
    <mimeMap fileExtension=".json" mimeType="application/json" />
  </staticContent>

 </system.webServer>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM