REST query fails for end users - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

REST query fails for end users

Last post 09-01-2017 01:08 PM by GMUDuckman. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-03-2017 09:58 AM

    REST query fails for end users

    Hi,

     I built a REST data connection to validate the presence of a target folder prior to exporting to PDF.

    The query works for me in and out of InfoPath.
    The query works for end users outside of InfoPath.
    The query FAILS for end users while in InfoPath. 

    I verified that the query uses the correct path and filter.
    I verified that the end user has permissions to the target folder.

    And obviously, because the following is to export to PDF, the form is Full Trust with a code signing certificate. 

    What am I missing? 

     

    Josée Sévigny
  • 08-04-2017 04:15 PM In reply to

    Re: REST query fails for end users

    So - they aren't using a browser form, but IP filler? If you just create a simple test for with the same REST query (no code) do they have the same issue? Do they get an actual error message on why the query fails? Oh, if this is in Filler, you may want to try running Fiddler when they try the form, so you can get a look at what's happening.
    Hilary Stoupa

  • 08-04-2017 05:13 PM In reply to

    Re: REST query fails for end users

    Hi Hilary,

    Correct, this is a Filler form. I did create a separate test form and it worked fine. The error that comes back only presents the URL (which is the correct one), saying that it can't return the results. There is no proper error handling for this unfortunately. Is there any way to extend the timeout on this? 

    BTW, just to give you a bit more info...
    The REST query targets folder in one of 12 possible SharePoint Document Libraries (hence not using a SharePoint List query because the URL is not modifiable at runtime).

    The user types the Client Number (which is the same as the target folder) and a rule picks this up, edits the REST URL and executes. Then in principle, another field is updated with the found folder name but this never happens because the query fails.

    I'm starting to think that I'd be better off exporting the PDF to a separate "fixed" library and building a new workflow to move it to the end target. At least it would be transparent to the end user.

    Thoughts? 

    Josée Sévigny
  • 08-07-2017 09:20 AM In reply to

    Re: REST query fails for end users

    You can extend the timeout in code for your data connection, yes - but I'm not sure why it would timeout for others and not for you? Did you try Fiddler?
    Hilary Stoupa

  • 08-24-2017 02:28 PM In reply to

    Re: REST query fails for end users

    Sorry for the delay.

     I've replaced the "personal" Code Signing certificate with a real one, still no luck.

    Here's my code. Am I using it correctly?

     

    cliLib = cliNo.Substring(0, 2) + "000";

    //get the REST connection
    FileQueryConnection fq = (FileQueryConnection)this.DataConnections["REST ClientLib"];


    try
    {
     //change the url to point to the client folder
     
     fq.FileLocation = this.ServerInfo.SharePointServerRootUrl.ToString() + "clients/c/docs/_vti_bin/listdata.svc/C_" + cliLib + "?$filter=Title eq '" + cliNo + "'";
     fq.Execute();

    }
    catch (Exception ex)
    {
     LogActivity(ActionStr.ERROR, ex.Message);
    }
     

    Josée Sévigny
  • 09-01-2017 01:08 PM In reply to

    Re: REST query fails for end users

    What error is is outputting? My guess is that Filer isn't passing along any authentication - can you setup the form up in a sharepoint infopath library and see if the form works properly if you open it in the browser?
Page 1 of 1 (6 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.