Second REST call within InfoPath causes state service error - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Second REST call within InfoPath causes state service error

Last post 09-30-2020 11:13 AM by Swati Sharma. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 08-29-2018 06:24 AM

    Second REST call within InfoPath causes state service error

    Hi all, I have an infopath form, which uses both SOAP and REST web services. When I work inside InfoPath form preview, everything works well. The problem is when I publish the form and use it from the IE browser, even though I am referencing the exact same web services. What happens in detail is the following. 1. On form load, I query REST service that I have created and it populates a repeating table. At this point, it works perfectly and the form opens. 2. When I try to execute that same REST service any time after form is opened, I get "A Microsoft SharePoint Server State Service error occurred while processing your request. For more information, contact your server farm administrator." In the logs, I only get "StateManager.GetState() Locked data" as the exception. The server where the REST is referring to is the same as where the sharepoint/infopath resides. Anyone else had similar scenario? Thanks, Branko
  • 09-11-2018 05:47 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    UPDATE TO THE QUESTION: Looking at the google chrome developer's tools, I find an error "Pagerequestmanager Cannot Be Initialized More Than Once" when I try to run the REST call the second time, the time of the error described above. It looks like it might be a postback issue, but no clue how to solve it in infopath with no code.
  • 09-11-2018 07:53 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    So - you aren't changing the REST URL at all, just running the same query again?
    Hilary Stoupa

  • 09-12-2018 01:48 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Exactly the same query, located at the same site as the InfoPath form. I even created another very simple form with a simple select REST - still the same error. I wonder if you would be able to reproduce the issue on your end with a simple form and REST select call. In addition, what is even stranger is that SOAP request works fine both on form load or any time after. I am using InfoPath 2013 with SharePoint 2016. For the REST calls, I have tried both using the _vti_bin/ListData.svc/ and _api/web/lists/ notation to select items from list. They both act the same way.
  • 09-13-2018 06:09 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    It somehow might be related to this thread: http://www.infopathdev.com/forums/t/21972.aspx?PageIndex=2, although no solution has been posted.
  • 09-13-2018 08:50 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    I don't have an on prem SharePoint 2016 server to test with, unfortunately. The other post you referenced mentions an anon access issue at the end of the thread, not sure if that applies (or, indeed, if that thread applies at all).
    Hilary Stoupa

  • 09-17-2018 08:53 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Setting the following key to false solved the issue. I am happy it works although I still don't understand why the REST service worked on load with authentication specified as secure store, but querying within the form would fail, bypassing the authentication for anonymous access. Same query, same udcx file specifications. Especially weird is that it does work with SOAP requests.
  • 09-28-2020 02:46 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Hi, I am facing the same issue. Could you please let me know which key was set to false which fixed the error.
  • 09-28-2020 07:49 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Looking at the other thread referenced, it sounds like anon access was disabled in IIS and it started working? But I'm not sure.
    Hilary Stoupa

  • 09-28-2020 11:52 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Hi, yes, in my case, I disabled anonymous access and it worked. I hope you manage as well.
  • 09-30-2020 11:13 AM In reply to

    Re: Second REST call within InfoPath causes state service error

    Thank you for the reply. I tried with disabling the anonymous access in IIS for all front end servers and the app server but it did not resolve the issue. Could you please share any other insights which can help to resolve this issue. I have tried millions of things but its not getting resolved
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.