How to configure IIS 7.5 to receive a request for a .json file using the POST method

Ive added a MIME type on idesktop for IIS 7.5 so that it now accepts and responds to GET requests for .json files. It works great.

But I also need to accept request requests using the POST method

I tried adding an additioanl handler to the ISAPI module and checked the box to accept all verbs, but no different. Indeed, hitting his head against the wall, as it was right in IIS 6.

enter image description here

Here is the answer from firebug

  Cache-control private
     Allow GET, HEAD, OPTIONS, TRACE
     Content-Type text / html;  charset = utf-8
     Server Microsoft-IIS / 7.5
     X-Powered-By ASP.NET
     Date Wed, 15 Feb 2012 11:16:34 GMT
     Content-Length 5669

Response Status - Method Not Allowed 405

Thanks in advance

+6
source share
1 answer

The question is, why do you want to receive a "POST" request in a JSON file? In a .json file, do you want you to put a static file containing JSON data or ASP.NET content?

In the look of the mapping you made, it looks like you actually added the Mapping Handler, not the MIME type. To add a MIME type in IIS7.5, refer to the following link: http://www.iis.net/ConfigReference/system.webServer/staticContent/mimeMap

-1
source

Source: https://habr.com/ru/post/908503/


All Articles