'Item Does Not Exist' error reading SharePoint 2010 List

一笑奈何 提交于 2019-12-06 03:37:57
Gregor Primar

You are most likely accessing the SPItem with incorrect credentials inside your web app. You should provide proper user impersonation.

Please read my post how to configure web app for impersonation for more details:

WindowsIdentity and Classic .Net App Pool

Well, I think I've found it. I was calling my page like this - mywebpage.aspx?id=1, where id=1 was the id of the item in the list I wanted my webpart to display. For some reason known only to Microsoft, using 'id' in the query string is a no-no. So I changed the param name to 'lid' and now everything works like I would expect.

Thanks for everyone's responses.

You, as the creator of an item, will have permission to access it. You need to check the permissions on the SharePoint list you are querying to see what permissions the account your code it using to authenticate has on the list for which you are not the author.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!