jQuery Ajax POST unsuccessful

后端 未结 3 1021
悲哀的现实
悲哀的现实 2020-12-11 18:37

I\'m unable to successfully post using jquery\'s ajax functionality.

URL of the running page is http://localhost:9999, URL of the target (web service)

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 19:26

    This is an issue with cross-domain ajax calls. Basically (at least in Firefox), a POST request is converted to an OPTIONS request for security reasons. I ran into the same exact thing last night, posted here.

    WCF Ajax Call not working with Jquery $.ajax

    I had an $.ajax call I was making on localhost:23485, to a web service on http://localhost hosted in IIS. Because they are different domains, cross-domain kicked in and made things difficult.

提交回复
热议问题