Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a page which displays some data based on list items which are stored in another site collection. Many of those items have custom permissions set up.

Story goes like this: when user has logged in earlier, when he goes to page with web part, it's displayed correctly. But when he is not logged in and tries to access web part page, he is taken to adfs login page. After successful login, he is taken back to web part page BUT he gets error that he is not allowed to view this page (native sharepoint error). But when he clicks "Go back to site" and tries to re-enter web part page, page is displayed correctly.

We tried with user which is site owner of the other site collection (where list items come from), but issue still exists. Our web application is claims based and we are using ADFS.

I'd be glad for some information where this issue might come from. Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

you should probably run your code with runwithelevatedprivileges.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.