Forbidden to retrieve page item by calling Web Service
I follow this <a href="blog.falafel.com/.../a> to test the web service. The Login method is success, but I was forbidden to get the Page item. Any solution?
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.
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