none
How to allow multiple testers to test an App for Excel 2013 before it is published RRS feed

  • Question

  • Here are the options I can think of:

    1) Get every tester to install Visual Studio and run the Office App within Visual Studio

    2) Create a shared folder on a network machine and configure every tester's Trusted App Catalogs to point to shared folder

    Option 1 doesn't look appealing and I may not have this many Visual Studio licenses. I tried Option 2 but I ran into a problem which fails all my Ajax calls in the app. The problem is posted in another question.

    Any recommendations?

    Tuesday, January 28, 2014 10:07 PM

All replies

  • My App for Excel 2013 has the following Ajax call. It runs fine in the Visual Studio environment. The call is treated as a cross domain call, the IE process triggers a preflight call (HTTP OPTIONS), my service responds to the preflight call with proper headers, and then the GET call is made and gets proper response.

    varqURL = 'https://server.com:8443/service_uri/'';

        jQuery.support.cors = true;

        $.ajax({

            type: "GET",

            url: qURL,

            cache: false,

            dataType: "json",

            timeout: 5000,

            crossDomain: true,

            headers: { 'Authorization': 'Bearer '+ access_token },

            success: function(data) {

                renderCustomerInfo(data);

            },

            error: function(jqxhr, textStatus, error) {

                ...

            }

        });

    I am trying to set up a test environment for my team so I copied my app to a shared drive on another machine. I configure my Excel 2013 Trust Center and set Trusted App Catalogs to point to the shared drive folder which contains the App manifest file. The app becomes available under Apps for Office in Excel. However the above call always returns error, "No transport". In the Fiddler, I don't even see the request is sent so I think the call is blocked in the JavaScript layer.

    Furthermore, I tried to open my App home page in a standalone IE browser and run my code that way. The same Ajax call is made successfully. It looks to me that the Office App environment imposes some security settings that fails the Ajax call if the App is running from a shared drive?



    Tuesday, January 28, 2014 9:19 PM
  • Please refer to this link:

    http://msdn.microsoft.com/en-us/library/office/fp161165.aspx

    Because apps for Office are webpages that run in a web browser control, they have to observe the same-origin policy: a webpage in one domain cannot make XmlHttpRequest web service calls to another domain other than the one where it is hosted.

    One way to overcome this limitation is to use JSON/P—provide a proxy for the web service by including a script tag with a src attribute that points to some script hosted on any domain. The developer can programmatically create the script tags, dynamically creating the URL to which to point the src attribute, and passing parameters to the URL via URI query parameters. Web service providers create and host JavaScript code at specific URLs, and return different scripts depending on the URI query parameters. These scripts then execute where they are inserted and work as expected.

    Wednesday, January 29, 2014 10:30 AM
  • Hi Andy_mic, thanks for your reply but please read my question carefully before you reply. My app runs fine in Visual Studio on my local machine. Moreover it runs fine from the shared folder using a standalone IE browser. Both cases are subject to the same SOP restrictions and they worked.

    JSONP is a hacky and limited way to make cross domain calls. As I explained, our services follow CORS to enable cross domain calls and they have proper handling of CORS preflight calls.

    In summary, it is the same JQuery Ajax calls in HTML page hosted in a shared drive. These calls work if the HTML page is launched in a standalone IE browser. They calls don't work if I run the App from a shared drive, and the error is "No transport". My fiddler trace doesn't show these request so it appears to be blocked at the JavaScript layer.

    Wednesday, January 29, 2014 1:54 PM
  • You can try the Window Azure windowsazure.com for your app deployment that supports http/https.

    Did you check 'Decrypt HTTPS traffic' in Fiddler Options -> HTTPS tab since the AJAX call is using SSL.

    Did you use the shared folder for your web app or web site? It works in Visual Studio because the localhost is special.

    Tuesday, February 18, 2014 5:57 AM