1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Forbidden to retrieve page item by calling Web Service

Forbidden to retrieve page item by calling Web Service

3 posts, 0 answered
  1. Gordon
    Gordon avatar
    2 posts
    Registered:
    21 Nov 2012
    22 Nov 2012
    Link to this post
    I follow this <a href="http://blog.falafel.com/Blogs/noel-rice/2012/03/28/using-sitefinity-5-claims-authentication">post</a> to test the web service. The Login method is success, but I was forbidden to get the Page item. Any solution?
  2. Gordon
    Gordon avatar
    2 posts
    Registered:
    21 Nov 2012
    22 Nov 2012
    Link to this post
    I found that if I login success in first time but without logout. When I login next time and get the item by web service. Forbidden problem is appeared.
  3. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    27 Nov 2012
    Link to this post
    Hello,

    The forbidden problem appears because after the first login a login cookie is created and the user is persisted as logged in for 2 hours (by default) you don`t need to login again while the authentication cookie created by the login and authentication methods is still active. You need to modify the code to call the logout method in GetPages() to be sure there is not logged in user at the moment and them login the user again after which the service will retreive results.

    The login cookie duration timer can be configured in Administration->Settings->Advanced->Security in textbox AuthCookieTimeout.



    Regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered