SharePoint 2013: The directory is not a subdirectory of the root directory.


Odd error indeed.  I recently built a SharePoint 2013 farm and everything was OK in the near term.  Suddenly when I created a site and tried to create a new site column I saw some unexpected things.  The first was navigating to the site column gallery.  Nothing was there.  Trying to create a new site column resulted in an error.  Upon inspection of the ULS logs I noticed the following errors.

System.Runtime.InteropServices.COMException: The directory is not a subdirectory of the root directory. 
(Exception from HRESULT: 0x80070090), 
StackTrace:    at Microsoft.SharePoint.SPFieldCollection.AddFieldToWeb(String strXml, Boolean checkDisplayName, Boolean isMigration, Boolean ignoreExistsError, Guid featureId, Guid solutionId)     
at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.ProcessWeb()     
at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.OnLoad(EventArgs e)     
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 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)

Application error when access /_layouts/15/mngfield.aspx, Error=The directory is not a subdirectory of the root directory. 
(Exception from HRESULT: 0x80070090)   at Microsoft.SharePoint.Library.SPRequestInternalClass.ThrowError(Int32 dwErr)     
at Microsoft.SharePoint.Library.SPRequest.ThrowError(Int32 dwErr)

System.Runtime.InteropServices.COMException: The directory is not a subdirectory of the root directory. 
(Exception from HRESULT: 0x80070090)    at Microsoft.SharePoint.Library.SPRequestInternalClass.ThrowError(Int32 dwErr)     
at Microsoft.SharePoint.Library.SPRequest.ThrowError(Int32 dwErr)
Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): 
Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: The directory is not a subdirectory of the root directory. 
(Exception from HRESULT: 0x80070090) ---> System.Runtime.InteropServices.COMException: The directory is not a subdirectory of the root directory. (Exception from HRESULT: 0x80070090)     
at Microsoft.SharePoint.Library.SPRequestInternalClass.ThrowError(Int32 dwErr)     at Microsoft.SharePoint.Library.SPRequest.ThrowError(Int32 dwErr)     --- End of inner exception stack trace ---     
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     
at Microsoft.SharePoint.Library.SPRequest.ThrowError(Int32 dwErr)     
at Microsoft.SharePoint.SPFieldCollection.AddFieldToWeb(String strXml, Boolean checkDisplayName, Boolean isMigration, Boolean ignoreExistsError, Guid featureId, Guid solutionId)     
at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.ProcessWeb()     at Microsoft.SharePoint.ApplicationPages.ManageFieldPage.OnLoad(EventArgs e)     
at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     
at System.Web.UI.Page.HandleError(Exception e)    
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, BooleanincludeStagesAfterAsyncPoint)     
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)

 

A search on the internet didn’t turn up anything of note.  The errors were all related to something else.  By tweaking my search terms and maybe just random luck I ran into this post, which seemed unrelated, but it made me double check the log files and I found the exception shown below right before the other ones in the ULS log.  That was the key.  When I setup my farm I failed to set the Administrator account to password never expires.  Originally the farm ran just fine, but once the default domain expiration policy kicked in the user could still log in to the machines in the farm, but was not being authenticated in SharePoint properly.  I went to my domain controller and set the password never expires attribute and all my problems went away.  My site columns appeared and I was able to create a site column without incident.  Thanks Brad!!  Without that post I would probably still be looking for an answer or rebuilding my farm.  Hopefully this post will help others as well who start their search with “the directory is not a subdirectory of the root directory”.

UserAgent not available, file operations may not be optimized.    
at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)     
at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo& fileInfo, SqlSession session, PrefetchResult prefetchResult) 
Comments (3)
  1. Brad Saide says:

    The error's a bit unintuitive, isn't it – that's what threw me as well… 🙂

    Glad the article helped. Cheers!

  2. kaushar says:

    I also started getting same error on searching any document.

    Just restarted Search Service and it started working.

  3. Sand says:

    Faced the same error…

    Just restarted IIS, it is started working.

    Thank you for the post.

Comments are closed.

Skip to main content