Frage

Ich arbeite an einer App für SharePoint 2013, die SharePoint-Hosted ist, und ich kann keine Daten von einem Remote-Webdienst mit einem JQuery.Ajax-Anruf erhalten.Die einzigen zwei Möglichkeiten, Remote-Daten von Microsoft dokumentiert zu werden, sind: Verwenden eines Web-Proxy-Anruf oder a Benutzerdefinierte Proxy-Seite .

sind diese Methoden die einzigen, die Sie verwenden können oder gibt es noch etwas anderes?Ich suche etwas, das mit dem JQuery.ajax-Anruf ähnlich ist.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top