How do I fix a “Request format is unrecognized for URL…” error in a web service running in IIS?

后端 未结 3 692
悲哀的现实
悲哀的现实 2020-12-01 13:43

I am get the following error while running web service in IIS:

Server Error in \'/Inbox Sevice\' Application. Request format is unrecognized for U

3条回答
  •  庸人自扰
    2020-12-01 14:32

    Just out of interest (- in the case of accessing the web-service via AJAX); I've found that if a 'content-type' header is not passed (- even if it's a local/"HttpPostLocalhost" request), then the issue occurs, so I pass the header myself (- e.g. via jQuery's '$.ajax()' method rather than without via jQuery's '$.getJSON()' method), instead of resorting to this:

    https://support.microsoft.com/en-us/kb/819267

提交回复
热议问题