2

I have simple requirement here to fetch data from Exchange Online EWS API & SharePoint lists and display those data onto HTML page of Apps for Office. This office app should work on OWA (Web mail) as well as Outlook client. I was able to see the response data in browser (OWA - Web mail), but when I am trying to load the same add-in on outlook client it doesn't show the data and gives the error in errorMessage as:

No Transport

So, we did try enabling the CORS using $.support.cors = true as per this thread, but no luck with that and got Access Denied error.

Does anyone have found the solution for this kind of scenario. Any help would be much appreciated.

Below is code snippet where I am getting that error:

$.ajax({
    url: "https://myazuretenant.azurewebsites.net/GetData.asmx/GetLocations",
    type: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (data) {
         // Data Manipulation goes here
    },
    error: function (data, errorCode, errorMessage) {
        app.showNotification('Error: ' + errorCode + ' - ' + errorMessage);
    }
});

Note: Ajax request is going through the generic Web API (ASMX Service), which fetches the data using ExchangeService library (EWS API) and SharePoint.

enter image description here

Pradip R.
  • 450
  • 1
  • 14
  • 31
  • 1
    from the other thread http://stackoverflow.com/questions/9160123/no-transport-error-w-jquery-ajax-call-in-ie, enable "cors" seems to be the right setting. when you get "Access Denied" error, does it come from your asmx web services? or come from the server that your asmx is trying to talk to? – Xiaomin Wu Nov 17 '15 at 17:22
  • When I run the same ajax post on browser, it does give proper response. While with Outlook Client, it is giving the error on `$.ajax` post request error function and returns `Access Denied` error. Does that mean Cross Domain issue occurs in Outlook Client only? (Note: ASMX web service is hosted on Azure web app) – Pradip R. Nov 18 '15 at 05:46
  • 1
    it is still unclear if it is blocked by outlook client, maybe try to use web debug tool like http://www.telerik.com/fiddler to see if there is any actual request try to go out? if you don`t see any request, then it is sure cause by the outlook client. Then the best is to go to corresponding MSDN forum ask for help from outlook client team. – Xiaomin Wu Nov 18 '15 at 18:19

0 Answers0