What is the best way to use a Json file as an endpoint?

Forums .NETWhat is the best way to use a Json file as an endpoint?
Staff asked 11 months ago

I’m currently working on a .Net application that integrates with Optimizely CRM. I’d like to access a JSON file similar to


However, I am able to obtain information from local sources, such as


However, when I try to deploy in the test environment, I receive the following problem.


https://www.xyz.com/files/test.json unable to locate

Any assistance would be greatly appreciated.

Answers (1)

Add Answer
Staff answered 2 months ago

Make sure that your iis or iisexpress can send JSON files. Setting the following property in web-config is a common way to accomplish this.

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

A sample of the element would be

      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
      <remove fileExtension=".woff"/>
      <remove fileExtension=".woff2"/>
      <remove fileExtension=".otf"/>
      <remove fileExtension=".ttf"/>
      <remove fileExtension=".eot"/>
      <mimeMap fileExtension=".woff" mimeType="application/font-woff"/>
      <remove fileExtension=".woff2"/>
      <mimeMap fileExtension=".woff2" mimeType="font/woff2"/>
      <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype"/>
      <mimeMap fileExtension=".ttf" mimeType="application/x-font-ttf"/>
      <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject"/>
      <mimeMap fileExtension=".json" mimeType="application/json" />


Thank you

John Price replied 2 months ago


Select Categories