none
SharePoint 2013 - random authentication issue where users are suddenly anonymous RRS feed

  • Question

  • Hi,

    I've banged my head for too long now on this issue, so I'm hoping anyone here can shed some light on it. We're running on April 2013 CU but the problem has existed since RTM.

    The issue is that some users (all of this random) can't access the site ("An error has occurred") and get an error page. The Web App is configured with Claims (NTLM and FBA Membership/Role Provider). No custom login page and configuration for the web.configs is verified. It works 99% of the times, but occasionally a user gets an error and I have to restart the Distributed Cache to fix it.

    1 WFE & 1 APP with SP2013 April 2013 CU with a few web apps. There's also a WAC server connected, but that shouldn't make a difference. The Distributed Cache runs only on the WFE:

    PS C:\> Use-CacheCluster
    PS C:\> Get-CacheHost
    
    HostName : CachePort      Service Name            Service Status Version Info
    --------------------      ------------            -------------- ------------
    WFE.domain.local:22233 AppFabricCachingService UP             3 [3,3][1,3]

    There's sufficient RAM to avoid the Distributed Cache to force purge data.

    The logs seem to indicate that the user is seen as anonymous:

    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2EE4	SharePoint Foundation         	Monitoring                    	nasq	Medium  	Entering monitored scope (Request (GET:http://mywebapp:80/)). Parent No	 
    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2EE4	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Name=Request (GET:http://mywebapp:80/)	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2EE4	SharePoint Foundation         	Authentication Authorization  	agb9s	Medium  	Non-OAuth request. IsAuthenticated=False, UserIdentityName=, ClaimsCount=0	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2B58	SharePoint Foundation         	General                       	af71	Medium  	HTTP Request method: GET	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2B58	SharePoint Foundation         	General                       	af75	Medium  	Overridden HTTP request method: GET	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.11 	w3wp.exe (0x1B64)                       	0x2B58	SharePoint Foundation         	General                       	af74	Medium  	HTTP request URL: /	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.13 	w3wp.exe (0x1B64)                       	0x2B58	SharePoint Foundation         	Files                         	aise3	Medium  	Failure when fetching document. 0x80070005	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.13 	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Site=/	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.13 	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	General                       	8e2s	Medium  	Unknown SPRequest error occurred. More information: 0x80070005	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.15 	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	General                       	aix9j	High    	SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mywebapp/	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.15 	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	General                       	ai1wu	Medium  	System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:    at Microsoft.SharePoint.SPWeb.InitWeb()     at Microsoft.SharePoint.SPWeb.get_EnableMinimalDownload()     at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString)     at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(HttpContext context)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreSendRequestHeaders(Object oSender, EventArgs ea)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.EndRequestHandler(Object oSender, EventArgs ea)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web....	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.15*	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	General                       	ai1wu	Medium  	...HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificati...	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.15*	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	General                       	ai1wu	Medium  	...onStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.15 	w3wp.exe (0x1B64)                       	0x28AC	SharePoint Foundation         	Monitoring                    	b4ly	High    	Leaving Monitored Scope (PreSendRequestHeaders). Execution Time=11,6273	fcfd239c-7f49-f04b-4187-c6fa1add3f5a
    06/10/2013 12:47:48.19 	w3wp.exe (0x1B64)                       	0x07E4	SharePoint Foundation         	Monitoring                    	nasq	Medium  	Entering monitored scope (Request (GET:http://mywebapp:80/_layouts/15/Authenticate.aspx?Source=%2F)). Parent No	 
    06/10/2013 12:47:48.19 	w3wp.exe (0x1B64)                       	0x07E4	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Name=Request (GET:http://mywebapp:80/_layouts/15/Authenticate.aspx?Source=%2F)	fcfd239c-5f4e-f04b-4187-c4e9f3c4dff3
    06/10/2013 12:47:48.19 	w3wp.exe (0x1B64)                       	0x07E4	SharePoint Foundation         	Authentication Authorization  	agb9s	Medium  	Non-OAuth request. IsAuthenticated=False, UserIdentityName=, ClaimsCount=0	fcfd239c-5f4e-f04b-4187-c4e9f3c4dff3
    06/10/2013 12:47:48.19 	w3wp.exe (0x1B64)                       	0x07E4	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Site=/	fcfd239c-5f4e-f04b-4187-c4e9f3c4dff3
    06/10/2013 12:47:48.19 	w3wp.exe (0x1B64)                       	0x07E4	SharePoint Foundation         	Monitoring                    	b4ly	Medium  	Leaving Monitored Scope (Request (GET:http://mywebapp:80/_layouts/15/Authenticate.aspx?Source=%2F)). Execution Time=8,0499	fcfd239c-5f4e-f04b-4187-c4e9f3c4dff3
    06/10/2013 12:47:48.32 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	Monitoring                    	nasq	Medium  	Entering monitored scope (Request (GET:http://mywebapp:80/_login/default.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F)). Parent No	 
    06/10/2013 12:47:48.32 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Name=Request (GET:http://mywebapp:80/_login/default.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F)	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.32 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	Authentication Authorization  	agb9s	Medium  	Non-OAuth request. IsAuthenticated=False, UserIdentityName=, ClaimsCount=0	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.32 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	Logging Correlation Data      	xmnv	Medium  	Site=/	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	8e2s	Medium  	Unknown SPRequest error occurred. More information: 0x80070005	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	aix9j	High    	SPRequest.GetPageListId: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mywebapp/_login/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%252F&Source=/	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:    at Microsoft.SharePoint.SPContext.get_ListId()     at Microsoft.SharePoint.SPContext.get_List()     at Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)     at Micros...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...oft.SharePoint.WebControls.ScriptLink.Register(String uiVersion, Control ctrl, Page page, String name, Boolean localizable, Boolean defer)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer)     at Microsoft.SharePoint.WebControls.ScriptLink.GetOnDemandScriptKey(String strKey, String strFile, Boolean registerDependencies, Control ctrl, Page page)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page page, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, ...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Co...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...ntrol.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.Proc...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...essRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr modul...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...eData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	8e2s	Medium  	Unknown SPRequest error occurred. More information: 0x80070005	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	aix9j	High    	SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mywebapp/_login/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%252F&Source=/	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:    at Microsoft.SharePoint.SPWeb.InitWeb()     at Microsoft.SharePoint.SPWeb.get_WebTemplateConfiguration()     at Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)     ...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...at Microsoft.SharePoint.WebControls.ScriptLink.Register(String uiVersion, Control ctrl, Page page, String name, Boolean localizable, Boolean defer)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer)     at Microsoft.SharePoint.WebControls.ScriptLink.GetOnDemandScriptKey(String strKey, String strFile, Boolean registerDependencies, Control ctrl, Page page)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page page, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, Stri...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...ng name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)     at Microsoft.SharePoint.WebControls.ScriptLink.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System....	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRun...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...time.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, Int...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...Ptr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	8e2s	Medium  	Unknown SPRequest error occurred. More information: 0x80070005	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	aix9j	High    	SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mywebapp/_login/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%252F&Source=/	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:    at Microsoft.SharePoint.SPWeb.InitWeb()     at Microsoft.SharePoint.SPWeb.get_EnableMinimalDownload()     at Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter writer)     at Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer)     at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean inclu...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...deStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	8e2s	Medium  	Unknown SPRequest error occurred. More information: 0x80070005	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	aix9j	High    	SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mywebapp/_login/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%252F&Source=/	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:    at Microsoft.SharePoint.SPWeb.InitWeb()     at Microsoft.SharePoint.SPWeb.get_EnableMinimalDownload()     at Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter writer)     at Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer)     at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean inclu...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...deStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)...	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33*	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	General                       	ai1wu	Medium  	...     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.33 	w3wp.exe (0x1B64)                       	0x25E4	SharePoint Foundation         	Monitoring                    	b4ly	Medium  	Leaving Monitored Scope (Request (GET:http://mywebapp:80/_login/default.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F)). Execution Time=17,7845	fcfd239c-2f56-f04b-4187-cca1c6a273e0
    06/10/2013 12:47:48.55 	w3wp.exe (0x1B64)                       	0x043C	SharePoint Foundation         	Authentication Authorization  	agb9s	Medium  	Non-OAuth request. IsAuthenticated=False, UserIdentityName=, ClaimsCount=0	 

    I'm figuring the Distributed Cache gets confused about the authentication tokens and starts handing out the wrong token to some users ? If I leave the Distributed Cache disabled it seems to permanently fix the issue, but that's not an ideal scenario.

    All help is appreciated!

    Monday, June 10, 2013 12:05 PM

All replies

  • How many concurrent user do you have for your SharePoint? What if you increase the cache size for your cache host http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx ?

    have you also enabled anonymous access for the SharePoint web application zone? will end user be prompt to authenticate at this random abnormal situation?

    Tuesday, June 11, 2013 2:41 AM
  • Hi,

    Concurreny is very low, shouldn't be more than 3 to 5 users.

    Currently it is 1024 MB. This is 10% of the total RAM (minus 2 GB), per the guidelines. Also there's no indication that it is being purged.

    Anonymous access is not enabled for that Web App zone, but it does have dual auth so the login page is anonymously available. Another zone does have anonymous enabled, but that zone is rarely used.

    When a user experiences issues he does get a login prompt, after a successful login the "An error has occurred" page shows.

    Tuesday, June 11, 2013 7:48 AM
  • just reviewed the ULS log in your inital post again, "Unknown SPRequest error occurred. More information: 0x80070005" draw my attention.

    Are there any custom code in your web application which dispose the SPRequest object before its needed. Note that SPSite and SPWeb also use SPRequest, you should not dispose them if they will be used later. (Another common issue for SPRequest is just the opposite: it is not disposed after usage, which cause memory leak).

    Also, could you please check Event Viewer->Custom Views->Server Roles->Web Server(IIS), to find if there is SharePoint web application pool recycle at the time of the issue.  Normally, that will not be a problem, because the recycle is overlapped. However, if the Shutdown Time Limit is too short for your pool, the app pool can be terminated and cause problem, you may increase the Shutdown Time limit to avoid this.


    • Edited by GuYuming Tuesday, June 11, 2013 8:37 AM
    Tuesday, June 11, 2013 8:32 AM
  • Hi,

    The SPRequest Error has code 0x80070005 (E_ACCESSDENIED) which is linked to the token being anonymous and thus denied access. There is no custom code involved in the login process or the application pages. All custom code adheres to the guidelines on unmanaged object disposal.

    I verified that the recycling options are left as default.

    At the same time other users are perfectly able to log in and make use of the environment, so it's not a general corruption of any kind.

    Thanks already!

    Tuesday, June 11, 2013 8:37 AM
  • I want to bump this up, since it's really annoying.

    Monday, June 24, 2013 10:56 AM
  • I am running into same issue - Claims based auth from PING and i cannot log in- I see in the logs thre are 12 claims in the initial attempt, and a login name etc.. but access denied issue here is preventing this from just clearing

    I need some help here.

    Thursday, July 11, 2013 10:32 PM
  • He Joseph,

    If you do an iisreset or stop/restart the distributed cache, does it work again for those users ?

    Friday, July 12, 2013 7:45 AM
  • please read about logon token cache section in http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-1.aspx ;

    And when anonymous authentication is enabled for a web application zone that use windows integrated authentication, SharePoint use WSS_Keepsessionauthenticated cookie to prevent reverting to anonymous. Also check the browser handling of this session cookie.

    also, analyze the error logs in WSS_Logging database if the logging is turned on: http://social.technet.microsoft.com/Forums/sharepoint/en-US/8ba7b6e9-0b5d-4c4b-bd66-d2c72bb538b3/web-analytics-for-specific-pages-somehow-with-2010-unique-visitors#06b4fdd9-1d24-445c-bddc-db9cac1135e0 . The data volume can be large, so, don't do this in a production environment, you can backup the WSS_logging database and analyze it elsewhere. 

    Friday, July 12, 2013 8:46 AM
  • When it happens, it happens for all the Web Apps

    • A: anon + ntlm + fba
    • B: ntlm
    • C: ntlm + fba

    The affected users can't access any of those while others have no issue.

    Meanwhile I took our TMG out of the equasion (Internet - Apache RP - ForeFront TMG - SharePoint 2013) but that didn't solve this specific issue. As soon as I enable the Distributed Cache someone will -at random- start having this issue. With the Distributed Cache off all is well.

    It strikes me that this isn't a general issue, I can't think of what we're doing is so exotic. I have installed SP2013 for many times at clients using the same methods and neither of them is experiencing this.

    I could try June 2013 CU but don't have high hopes.

    Tuesday, July 23, 2013 3:34 AM
  • Hi Steven,

    I'm also having the exact same issue. Did you have any luck with the June 2013 CU?

    Tuesday, September 3, 2013 1:14 PM
  • Hi Tallak,

    June 2013 CU did not fix it. I've seen similar posts that all have the ANON+AUTH factor as common denominator. Is this the case for you as well ?

    We're still running with the Distrib Cache off btw.


    Tuesday, September 3, 2013 1:16 PM
  • The issue is actually described in detail here
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/b1cec90c-c8e4-4a7c-9407-b98ce237c7f0/sharepoint-app-connecting-to-search-rest-api-with-oauth-random-claim-fail

    We are using the REST API for querying the index. Occasionally the user lookup in Distributed Cache fails which causes the user to be treated as anonymous and makes the query return with an error.

    Tuesday, September 3, 2013 1:32 PM
  • We opened a case for this and the Microsoft Support Engineer confirmed this was a 'known issue' with the Distributed Cache and the fix is incorporated in the December 2014 Cumulative Update for SharePoint (not AppFabric). Have yet to try this...
    Thursday, January 22, 2015 8:08 AM
  • Could you fix the error with the December CU ?
    Thursday, January 29, 2015 10:42 AM
  • Hi,

    It wasn't resolved for us. We've even rebuilt the entire farm on Dec14CU but still the issue. I've informed the escalation engineer on this. For now we keep the Distributed Cache disabled permanently, although less than ideal.

    Thursday, January 29, 2015 10:44 AM
  • Hi, Was this ever fixed? I am also facing same problem..
    Saturday, April 18, 2015 5:58 PM
  • The case is still being investigated by Microsoft.
    Sunday, April 19, 2015 4:49 AM
  • I'm having the same (or a very similar) issue (v15.0.4631.1000), but it seems that visiting the site in IE (mostly) avoids the 401. I created a custom masterpage and wanted to read and build some controls based on data in the property bag of the context web. Reading the property bag threw the 401 error. The weird thing is I'm not even prompted for a login box before getting the 401. If I switch from Chrome to IE and visit the same start.aspx page I get a 401 here as well, but if I visit the site url directly I get a regular login prompt (almost* always).

    Scenario (this almost* always reproduces the error):

    1. IISReset
    2. Visit the site @ "/_layouts/15/start.aspx"
    3. Throws 401
    4. Visit the site url directly @ "/"
    5. Prompted for login and works

    *I've seen that on a few occasions I still get a 401 after using IE and sometimes I also get the login in Chrome, but I've not been able to discover exactly why this happens yet.

    Hopefully this might shed some more light on the issue.

    Tuesday, April 28, 2015 6:22 AM
  • we are having exactly same problem with new SP2013 farm, did anybody got resolution on this.

    S.Venkata Appaji

    Monday, April 25, 2016 2:29 PM
  • Same issue here, any solution?
    Wednesday, May 11, 2016 6:25 AM
  • The issue was to do with the loopback check not being disabled. To disable I used powershell to set the value to disable it.

    New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword

    Friday, May 13, 2016 6:24 AM
  • Hi Microsoft, 

    Can you confirm if this is still an issue. We have Ping IDP and after adding users to the site as admins, we cant access the site.

    Please help.

    Sunday, May 22, 2016 8:11 AM
  • We've got SharePoint 2013 with June 2017 CU and we'v got the same issue. Only some random users have this error only on some Site collections:

    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
     at Microsoft.SharePoint.Library.SPRequest.GetPageListId(String bstrUrl, Guid& pgListId)    
     at Microsoft.SharePoint.SPContext.get_ListId()    
     at Microsoft.SharePoint.SPContext.get_List()    
     at Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, String language, String uiVersion)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(String uiVersion, Control ctrl, Page page, String name, Boolean localizable, Boolean defer)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strFile, Boolean localizable)    
     at Microsoft.SharePoint.WebControls.ScriptLink.GetOnDemandScriptKey(String strKey, String strFile, Boolean registerDependencies, Control ctrl, Page page)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page page, String strFile, Boolean localizable)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion, String ctag)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, String language, String uiVersion)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(String uiVersion, Control ctrl, Page page, String name, Boolean localizable, Boolean defer)    
     at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page, String name, Boolean localizable, Boolean defer)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strKey, String strFile, Boolean localizable)    
     at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl, Page page, String strFile, Boolean localizable)    
     at Microsoft.SharePoint.WebControls.ScriptLink.OnLoad(EventArgs e)    
     at System.Web.UI.Control.LoadRecursive()    
     at System.Web.UI.Control.LoadRecursive()    
     at System.Web.UI.Control.LoadRecursive()    
     at System.Web.UI.Control.LoadRecursive()    
     at System.Web.UI.Control.LoadRecursive()    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
     at System.Web.UI.Page.ProcessRequest()    
     at System.Web.UI.Page.ProcessRequest(HttpContext context)    
     at ASP._layouts_15_accessdenied_aspx.ProcessRequest(HttpContext context)    
     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)    
     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)    
     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)    
     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)    
     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)    
     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)    
     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    
     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

    Was anyone able to resolve it?

    Update:

    In our case, the problem turned out to be an incorrect user SID in a site collection.

    SPUser.SystemUserKey stores a SID value. And turned out that the user that could not access the site colleciton had a different (old) SID.

    I ended up deleting the user from all groups, deleting a hidden user list and adding the user back. It helped. Deleting the user from the hidden user list is crucial. Otherwise the SID will still be stuck:

    # SiteUserInfoList is a hidden user list:
    $problematicUser = $webBroken.SiteUserInfoList.Items | Where-Object {$_.Title -eq "FirstName LastName"}
    
    # Deleting user with an old SID:
    $webBroken.AllowUnsafeUpdates = $true;
    $webBroken.SiteUsers.RemoveByID($problematicUser.ID);
    $webBroken.Update();
    $webBroken.AllowUnsafeUpdates = $false;


     


    Denis


    Tuesday, June 5, 2018 2:31 PM