Friday, December 7, 2012

Access Denied when using InfoPath 2010 and REST web services

Have you created an InfoPath form and used REST webservices to retrieve filtered data using rules to modify  the filter parameters and faced issues.

Very recently we had an interesting problem reported in our production environment where one of the InfoPath form hosted for an application serving executives taking page load times of 45 seconds. We immediately started looking into the form to perform root cause analysis; after spending an hour we realized its due the way the form is designed to retrieve data from a list and use "Filter Data" assignment of the default value of the field.

The list items of that list had grown to 900 items and thus was taking a really long time to load the data and then apply filters, we immediately changed the approach to use ListData.svc REST webservice to retrieve only the filtered data based on the logged in user. While the approach worked fine for the users who had admin privileges but we were getting complaints from the executives that the form has stopped working completely.

Further analysis of ULS indicated an interesting log entry which was triggered immediately when the form was trying to modify the REST url to invoke a REST service call.


12/07/2012 17:01:52.71 w3wp.exe (0x0780) 0x1A5C SharePoint Foundation General 8kh7 High Access denied. a1403e1e-1194-4fc4-bbd7-2fcf2a9cd096

It was found that users with read privileges won't be able to make use of the Modify Filter Parameters ruleset and they need an additional permission set "Browse Directories" in order to make this work. 

So we created an additional permission level which is the replica of the "Read" permission level with an extra permission "Browse Directories" permission added to it. The permission level should look like 


6 comments:

  1. Hello There. I found your blog using msn. This is an extremely well written article.
    I will make sure to bookmark it and return to read more of your useful information.
    Thanks for the post. I'll definitely comeback.

    Feel free to surf to my blog :: Read the Full Write-up ()

    ReplyDelete
    Replies
    1. I am glad you liked it. I haven't been active on blogs these days but will try to do so. Thank you.

      Delete
  2. Gгеat wo&X72;k! That is &X74;he &X6B;ind of
    informatіon t&X68;at are supрοsed to be sh&X61;red аrou&X6E;d the
    &X6e;et. Disgrace on &X74;he ѕearсh engi&X6e;es
    &X66;оr not posіtioning t&X68;is submit upρer!
    Co&X6d;e &X6f;n over and νiѕit my web site .
    T&X68;ank you =)

    Also visit my we&X62; sіte - Unfallrente

    ReplyDelete
  3. Bemerkenswerte Erläuterung, Sie haben einen neuwertigen Leser dazugewonnen.
    Haben Sie einen rss feed, den ich abonnieren kann?

    my blog - Channeling 2013

    ReplyDelete
    Replies
    1. Thank you, no I don't think I have enabled the RSS feeds. Shall look into it and if possible enable it.

      Delete