How to allow download of json file with ASP NET

0 votes
How can I enable the download of *.json files from an old ASP.NET site (IIS6 I am led to believe)?

I am getting a 404 page instead of the JSON file.

Do I need to create a web.config file? What goes in it?
Jul 23, 2020 in Angular by kartik
• 37,520 points
2,158 views

1 answer to this question.

0 votes

Hello @kartik,

If you want to manually add support to your site, you can just add the following to your web.config in the system.webServer section:

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

This will add a "local" configuration under IIS. This does not work in IIS6, but does work in IIS7 and newer.

Hope it is helpfull!!
Thank you!!

answered Jul 23, 2020 by Niroj
• 82,840 points

Related Questions In Angular

0 votes
1 answer

How do you bind an Enum to a DropDownList control in ASP.NET?

Hello @kartik, I probably wouldn't bind the data as it's ...READ MORE

answered Jul 23, 2020 in Angular by Niroj
• 82,840 points
3,019 views
0 votes
1 answer

How to allow access outside localhost?

Hello kartik, You can use the following command ...READ MORE

answered Apr 22, 2020 in Angular by Niroj
• 82,840 points
8,766 views
0 votes
1 answer

How to have conditional elements and keep DRY with Facebook React's JSX?

Hello @kartik, Let's define a simple helping If component: var If ...READ MORE

answered Jun 4, 2020 in Angular by Niroj
• 82,840 points
718 views
0 votes
1 answer

How to disable postback on an asp Button?

Hello @kartik, Use: YourButton.Attributes.Add("onclick", "return false"); or <asp:button runat="server" ... OnClientClick="return ...READ MORE

answered Jul 23, 2020 in Angular by Niroj
• 82,840 points
6,574 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
4,230 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,840 points
3,278 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,840 points
1,149 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
1,049 views
0 votes
2 answers

How to access session variables from any class in ASP.NET?

Accessing session Variable in a class file ...READ MORE

answered Sep 3, 2020 in Angular by Okugbe
• 280 points
7,691 views
0 votes
1 answer

How to add “active” class to Html.ActionLink in ASP.NET MVC?

Hello @kartik, The way you handle your UI ...READ MORE

answered Jul 23, 2020 in Angular by Niroj
• 82,840 points
8,000 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP