Problem sending JSON data from JQuery to WCF REST method

后端 未结 5 745
小蘑菇
小蘑菇 2020-11-30 01:27

I\'m having some trouble getting jquery to post some json data to a rest method I have on my WCF service.

On the WCF side, here\'s the operation contract:

         


        
5条回答
  •  天命终不由人
    2020-11-30 02:06

    This seems to be a Firefox thing for avoiding cross domain calls. See http://www.petefreitag.com/item/703.cfm

    The spec for this is here http://www.w3.org/TR/cors/ and after a very brief read, it appears that because you are doing a cross domain call, your service is expected to implement the OPTIONS method and return some headers that allow the POST method to be sent.

提交回复
热议问题