如何允许使用ASP.NET以.json文件下载 [英] How to allow download of .json file with ASP.NET
本文介绍了如何允许使用ASP.NET以.json文件下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能使从旧的ASP.NET网站(IIS6导致我相信)下载的*以.json文件?
How can I enable the download of *.json files from an old ASP.NET site (IIS6 I am led to believe)?
我得到一个404页面,而不是JSON文件的。
I am getting a 404 page instead of the JSON file.
我需要创建一个web.config文件?什么在它去?
Do I need to create a web.config file? What goes in it?
推荐答案
JSON的MIME类型添加到IIS。按照指示在<一个href=\"http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/iis/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx\">MSDN's配置MIME类型(IIS 6.0)。
Add the JSON MIME type to IIS. Follow the directions at MSDN's Configure MIME Types (IIS 6.0).
- 扩展:以.json
- MIME类型:应用程序/ JSON
- Extension: .json
- MIME type: application/json
不要忘了更改后重新启动IIS。
Don't forget to restart IIS after the change.
这篇关于如何允许使用ASP.NET以.json文件下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文