Is there any way to check the source of access denied. Sometimes users have access to the page, but do not have access to something on the page, or some code that requires access. For instance, a WP is trying to query a list that the current user does not have access to.
Is there way to find out this kind of information. I looked into SP Logs but found nothing useful. I know my Contribute user has access to the site and the page. However, a WP on the page is causing the "access denied" message.
I can try to remove each WP using ?contents=1, but I was wondering is there is a better option, that just tells you the source.
Update: My webpart is throwing access denied on contribute and read-only users. I debugged the code and none of the breakpoints get hit, not even the ones on Page_Load. I checked all the references, and the user has access to all of them. When I remove my wp, the page works fine, no access denied.