I have a web part page with nothing on it.

The user has SPBasePermissions.Open and SPBasePermissions.ViewPages only.

The ULS shows:

UnauthorizedAccessException for the request. 403 Forbidden will be returned. Error=Attempted to perform an unauthorized operation.
at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex)
at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound)
at Microsoft.SharePoint.ApplicationRuntime.SPVirtualFile.CalculateFileDependencies(HttpContext context, SPRequestModuleData basicRequestData, ICollection& directDependencies, ICollection& childDependencies)
at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.EnsureDependencies(HttpContext context, SPRequestModuleData requestData)
at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.EnsureCacheKeyAndViewStateHash(HttpContext context, SPRequestModuleData requestData)
at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.GetVirtualPathProviderCacheKey(HttpContext context, SPRequestModuleData requestData)
at Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider.GetCacheKey(String virtualPath)
at Microsoft.SharePoint.Publishing.Internal.CmsVirtualPathProvider.GetCacheKey(String virtualPath)
at System.Web.Compilation.BuildManager.GetCacheKeyFromVirtualPath(VirtualPath virtualPath, Boolean& keyFromVPP)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

If I add the permission SPBasePermissions.ViewFormPages (labeled in the UI as "View Application Pages") this loads fine.

Why is this permission needed?

  • Are there any form Web Parts present on the page? – Falak Mahmood Feb 6 '14 at 0:32
  • Nope, there are no web parts on the page at all. – RJ Cuthbertson Feb 6 '14 at 14:47
  • I'm wondering if it's something in the master page... – RJ Cuthbertson Feb 17 '14 at 21:04
  • 1
    Stupid question time: 1. Why do you have a Web Part Page with no Web Parts? 2. If you add a Web Part to the page, does the user get the error? 3. Have you tried adding a Basic Page to your Document Library and seeing what permissions the user needs? – CigarDoug Dec 8 '14 at 14:25
  • IIRC I had an empty web part page to try to debug least level of privilege, but the extra permission in question was being required by something in the master page. I have no way to verify this now though, don't even work with SharePoint anymore. – RJ Cuthbertson Dec 8 '14 at 15:02

Browse other questions tagged or ask your own question.