使用Ajax POST的WCF RESTFull服务 [英] WCF RESTFull service with Ajax POST

查看:60
本文介绍了使用Ajax POST的WCF RESTFull服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用POST方法创建RESTFull WCF服务,该方法由来自ASP.NET或PhoneGap的Ajax调用

How can I create a RESTFull WCF Service with POST Method which is called by Ajax from ASP.NET or PhoneGap

推荐答案

不确定您的跨域问题是否已解决解决了,但是一旦我在我的某个项目中遇到了跨域的错误问题,请让我与您分享。基本上有2个项目,一个是ASP.NET Umbraco CMS前端,另一个是后端的Web API项目。这两个项目都作为不同的项目和不同的域进行托管。并且Umbraco前端用于对web api进行
Not sure if your cross domain issue got resolved, but once I had a bad issue with cross domain in one of my project and let me share with you. There were 2 projects basically, one was a ASP.NET Umbraco CMS front end and another a Web API project on the back end. Both the projects were hosted as different projects and with different domains. and the Umbraco front end used to do


.ajax GET / POST,我们开始面临跨域问题。我尝试做所有事情,如启用跨域和其他东西,并接近实现它,但无法让它在所有浏览器上工作。

由于我有一个严格的截止日期,我们以不同的方式设计了前端和后端网站之间的通信。所以我们所做的不是从前端网站到后端web api进行
.ajax GET/POST to the web api and we started facing cross domain issue. I tried to do everything like enabling cross domain and other stuff and was close to achieving it but couldn't get it to working on all browsers.
As i had a strict deadline we designed the communication between the front end and the back end websites in a different way. So what we did was instead of making


.ajax调用,我们做了
.ajax calls from the front end website to the back end web api, we made


这篇关于使用Ajax POST的WCF RESTFull服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆