SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had an issue where users are getting "Access Denied" even though they shouldn't. It turned out to be related to custom code and fixed in the end, but there was a lot of guesswork involved.

Is there any way to troubleshoot Access Denied errors without guessing all the time? Surely, something somewhere throws the ThreadAbort/UnauthorizedAccessException, can I get the Stacktrace of that or get SharePoint to emit more logfiles?

I know of ways to handle it once I know where the issue is (SPSecurity), but if all I have is an Access Denied error and possibly 20 different places to look, it becomes tedious.

share|improve this question

While not a definitive answer, some of the questions I ask myself when trying to diagnose issues like that are:

  • What is the user trying to do when they receive the error? (ie access content, modify content etc)?
  • Is the problem isolated to a specific user, or to a group of users?
  • Is the problem isolated to a single site collection?
  • Are there any third party apps, workflows etc installed that might modify permissions?
  • Are all the site assets that are involved checked in, published etc (ie master pages, page layouts)?
  • Is there anything in the ULS logs that might indicate what's going on?

If you can answer some, if not all of these questions, it can help narrow down the areas in which you need to look.

share|improve this answer

Access Denied and similar exceptions are almost always logged in the trace/ULS logs, and easy to discover.

share|improve this answer

When you get ThreadAbortedException, check InnerException.

EDIT: This is only helpful if you can attach a debugger, or have access to the source code and can redeploy. Just a thought :P

EDITEDIT: You should probably review the code in your custom solutions to handle all exceptions properly, too.

share|improve this answer
But that means I would have already narrowed it down to custom code. It doesn't help if I don't know where to start looking. Would I need an IIS Module that runs at the end of every request? – Michael Stum Dec 19 '11 at 22:42
Module seems a messy way to do it. Have you had much luck looking using the ULS logs to troubleshoot exceptions? – James Love Dec 19 '11 at 22:50

Your Answer


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.