Answered by:
Problems with permissions on custom sitemap

Question
-
I have added a custom sitemap to my webconfig:
<add name="CustomXmlContentMapProvider" siteMapFile="_app_bin/tmw.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
I then created this map in _app_bin and referred to it within my sitedefinition. All is well, it works fine. However unless the file has read/execute permission for all, it will throw an error every morning. That is the weird part, it doesn't occur throughout the day, just for a few hours in the morning ending before 9:00am. This makes no sense to me since the webserver can read the file and none of the other files in that directory have special permissions. Does anyone know why this might occur? Here is the error thrown (when the file doesnt have r/x for all and only in the morning):
Request information:
Request URL: http://sharepoint/dev/ltc/parallel/default.aspx
Request path: /dev/ltc/parallel/default.aspx
User host address: 172.16.27.107
User: jlmartin
Is authenticated: True
Authentication Type: NTLM
Thread account name: spadmin
Thread information:
Thread ID: 10
Thread account name: spadmin
Is impersonating: False
Stack trace: at System.Web.XmlSiteMapProvider.CheckSiteMapFileExists()
at System.Web.XmlSiteMapProvider.GetConfigDocument()
at System.Web.XmlSiteMapProvider.BuildSiteMap()
at Microsoft.SharePoint.Navigation.SPXmlContentMapProvider.BuildSiteMap()
at System.Web.XmlSiteMapProvider.get_RootNode()
at System.Web.UI.WebControls.SiteMapDataSource.GetNodes()
at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath)
at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath)
at System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item)
at System.Web.UI.WebControls.Menu.PerformDataBinding()
at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.Menu.EnsureDataBound()
at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript)
at Microsoft.SharePoint.WebControls.AspMenu.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Monday, April 28, 2008 2:00 PM
Answers
-
The problem was resolved by giving 'Everyone' Read and Read & Execute permission to the sitemap file.
- Proposed as answer by dwing2 Monday, March 2, 2009 1:06 PM
- Marked as answer by Michael Washam - MSFT Monday, March 2, 2009 8:19 PM
Monday, March 2, 2009 1:06 PM
All replies
-
I'm having this same problem. What was your solution?Friday, February 27, 2009 1:22 PM
-
The error being received..what exactly is it? The stack trace that was left i April doesnt show the exception or error, just where it occurs. Is it a file not found you are getting at different times of the day?
Stu
Starznet SharePoint Blog : http://www.starznet.co.uk/sharepoint/blog
Please mark replies as answered if you find it has helped you
Contact : http://www.starznet.co.uk/contactstarznet.htmFriday, February 27, 2009 3:11 PM -
I had similar problem. It got fixed when we set permission for the sitemap file. The sitemap file is cached after loaded, so it used to work for sometime, once the cache gets invalidated , we used to get file not found error.
-Sridhar http://sridharu.blogspot.comFriday, February 27, 2009 3:35 PM -
Here's the error I get below and yes, it is a file does not exist error received at different times during the day. I have set the file permissions to read and execute for 'everyone' and we will test again tomorrow morning.
The file _app_bin/NokiaMenu.sitemap required by XmlSiteMapProvider does not exist.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The file _app_bin/NokiaMenu.sitemap required by XmlSiteMapProvider does not exist.
Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:[InvalidOperationException: The file _app_bin/NokiaMenu.sitemap required by XmlSiteMapProvider does not exist.]
System.Web.XmlSiteMapProvider.CheckSiteMapFileExists() +2840264
System.Web.XmlSiteMapProvider.GetConfigDocument() +297
System.Web.XmlSiteMapProvider.BuildSiteMap() +152
Microsoft.SharePoint.Navigation.SPXmlContentMapProvider.BuildSiteMap() +92
System.Web.XmlSiteMapProvider.get_RootNode() +20
System.Web.UI.WebControls.SiteMapDataSource.GetNodes() +231
System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath) +35
System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath) +53
System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +53
System.Web.UI.WebControls.Menu.PerformDataBinding() +49
System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +117
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.Menu.EnsureDataBound() +38
System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript) +64
Microsoft.SharePoint.WebControls.AspMenu.OnPreRender(EventArgs e) +166
System.Web.UI.Control.PreRenderRecursiveInternal() +118
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Control.PreRenderRecursiveInternal() +239
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3681
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
- Proposed as answer by AcidTrash Tuesday, April 3, 2012 1:46 PM
Friday, February 27, 2009 9:40 PM -
The problem was resolved by giving 'Everyone' Read and Read & Execute permission to the sitemap file.
- Proposed as answer by dwing2 Monday, March 2, 2009 1:06 PM
- Marked as answer by Michael Washam - MSFT Monday, March 2, 2009 8:19 PM
Monday, March 2, 2009 1:06 PM -
Hi, I'm having the same problem, could you please tell me how do i set these permissions? ThanksMonday, October 4, 2010 1:42 PM
-
Better approach and easy to deploy and no issue on impersonations. Enjoy the post.
http://sasikumarreddyv.blogspot.in/2012/03/file-appbinwebsitemap-required-by.html
- Proposed as answer by Sasi Kumar Reddy V Friday, March 9, 2012 7:13 PM
Friday, March 9, 2012 7:12 PM