我正在为SharePoint 2013工作,这是SharePoint托管的,我无法使用jQuery.ajax调用从远程Web服务中获取数据。获取Microsoft记录的远程数据的唯一方法是:使用 Web代理调用> 自定义代理页面

这些方法是您只能使用的唯一可以使用或有其他可用的方法吗?我正在寻找类似jquery.ajax呼叫类似的东西。

有帮助吗?

解决方案

Here is a method to accomplish this: from the JavaScript page code use the jQuery.ajax function with the argument "dataType" set to "jsonp" and call the web service that supports jsonp requests and that returns a json result back.

You can find more details about a .NET specific implementation of a web service and the call code here: Rick Strahl - Creating a JSONP Formatter for ASP.NET Web API. You can get data from any web service that supports jsonp calls: it can be a node.js or a rails service.

许可以下: CC-BY-SA归因
scroll top