For one of our clients, the role based protection of their website keeps on disappearing. I have searched the forums, but there doesn't seem to be a solution to this specific problem.
Can someone PLEASE help me with this? It just happened again, and while it's no problem to just add the roleprotection again, it is quite frustrating since our client uses it to keep some information on a need to know basis.
We REALLY need this fixed and I'm at wits end at the moment.
There are no maintaince tasks that do this, but I did check the file you mentioned. It was a pretty big and weird looking mess with several nodes being included multiple times or referencing non-existing pages... So I made a backup and cleared out the entire file, touched the web.config and reassigned the roleprotection to how it's supposed to be. The file has now been updated by Umbraco and looks correct (at least, in the file I can see an XML version of my manual configuration rather then a steaming pile of shit like before).
Ok, the above post does nothing to improve our situation as it just happened again. We double checked the access.config and it's still there and has the correct data. I -REALLY- need a solution for this.
Does anyone else have any suggestions? As I have said before, I -REALLY- need this fixed as soon as possible.
-Ferdy
Edit:
Okay, I found this in the log, the timestamps seem to correspond with the moments our roles are reset and the pages involved include the pages we use for the login and error pages. Not sure if this is relevant or not, but figured I'd might as well post it:
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/rechercher' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/geen-toegangsrechten' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/login' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/zoek' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/pagina's' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/geen-toegangsrechten' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/login' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/pagina's-vl/hotnews-vl-(button-niet-zichtbaar)/embargo-update' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/pagina's-vl' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/pagina's-nl/actie-memo's-nl/actiememo-aangenaam-klassiek' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Oh woops, guess I forgot to mention. Its our Umbraco 4.5.2 installs that are experiencing this problem which are running on a Windows 2003 server with a windows 2008 database server.
Anyway, I'll go check if disabling the sitemap provider will help.
Okay, I tried disabling the sitemap provider, but then I can no longer publish nodes as I get the following error on trying:
This feature is currently disabled, please enable section system.web/siteMap in the configuration file.
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: This feature is currently disabled, please enable section system.web/siteMap in the configuration file.
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.
Ah, I thought that was a bit too drastic of a measure, so I figured I'd just set enabled to false haha. Anyway, I removed the entire element and it seems to work. I'll let you know how it goes!
I would start by hooking into all of the event handlers that the Access class has so you can debug and figure out where exactly it goes wrong. There's still the possibility that it's not even Umbraco-related, so at least you'd be able to find that out as well, here's a quick eventhandler to get you going (believe it should work in 4.5.2 as well):
using System.IO;
using System.Linq;
using umbraco.BusinessLogic;
using umbraco.IO;
using umbraco.cms.businesslogic.web;
namespace Umbraco.Extensions.EventHandlers
{
public class AccessLog : ApplicationBase
{
public AccessLog()
{
Access.BeforeSave += Access_BeforeSave;
}
private void Access_BeforeSave(Access sender, umbraco.cms.businesslogic.SaveEventArgs e)
{
Log.Add(LogTypes.Debug, -1, "About to save access file");
if(File.Exists(IOHelper.MapPath(SystemFiles.AccessXml, true)))
Log.Add(LogTypes.Debug, -1, "It's still here!");
else
Log.Add(LogTypes.Debug, -1, "Oh noes, something must've gone horribly wrong while saving this file");
}
}
}
Thanks Sebastian, I'll go implement it. Though, just a random thought, would it perhaps be smarter to check the CONTENTS of the Access.xml file? The file it self is still there afterall, it just either turns into a garbled mess or gets (partially) ignored.
Umbraco seems to still knows the page is for members only, it just doesn't seem to remember which page it has to redirect non logged in users towards.
Ah I didn't read properly, didn't realize the file was just being corrupted.. So yeah, it would be better to check the content. Also make sure to compare the file when it was still correct to the file which has the corruption, that should narrow down where exactly the problem is introduced.
Role protection suddenly disappeared
For one of our clients, the role based protection of their website keeps on disappearing. I have searched the forums, but there doesn't seem to be a solution to this specific problem.
-Ferdy
Can someone PLEASE help me with this? It just happened again, and while it's no problem to just add the roleprotection again, it is quite frustrating since our client uses it to keep some information on a need to know basis.
We REALLY need this fixed and I'm at wits end at the moment.
-Ferdy
Do you by any chance have a maintenance task that wipes the App_Data/access.config file?
/Carsten
Hi Carsten
There are no maintaince tasks that do this, but I did check the file you mentioned. It was a pretty big and weird looking mess with several nodes being included multiple times or referencing non-existing pages... So I made a backup and cleared out the entire file, touched the web.config and reassigned the roleprotection to how it's supposed to be. The file has now been updated by Umbraco and looks correct (at least, in the file I can see an XML version of my manual configuration rather then a steaming pile of shit like before).
So, here's hoping that did it!
Thanks for your input.
-Ferdy
Ok, the above post does nothing to improve our situation as it just happened again. We double checked the access.config and it's still there and has the correct data. I -REALLY- need a solution for this.
-Ferdy
Does anyone else have any suggestions? As I have said before, I -REALLY- need this fixed as soon as possible.
-Ferdy
Edit:
Okay, I found this in the log, the timestamps seem to correspond with the moments our roles are reset and the pages involved include the pages we use for the login and error pages. Not sure if this is relevant or not, but figured I'd might as well post it:
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/rechercher' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/geen-toegangsrechten' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/login' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/zoek' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info/pagina's' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://fr.******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/geen-toegangsrechten' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/login' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/pagina's-vl/hotnews-vl-(button-niet-zichtbaar)/embargo-update' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info/pagina's-vl' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://be.******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/pagina's-nl/actie-memo's-nl/actiememo-aangenaam-klassiek' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Error adding to SiteMapProvider: System.Web.HttpException: 'http://******.info' is not a valid virtual path. at System.Web.Util.UrlPath.CheckValidVirtualPath(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)
Sorry for bumping this yet again, but I really need help :(
-Ferdy
Bump again :(
-Ferdy
Okay, I REALLY need help with this.
It is starting to happen with more and more of our installations, even ones we haven't even touched in months.
What version of Umbraco?
Do you need the sitemap provider? Else can you try disabling it?
Oh woops, guess I forgot to mention. Its our Umbraco 4.5.2 installs that are experiencing this problem which are running on a Windows 2003 server with a windows 2008 database server.
Anyway, I'll go check if disabling the sitemap provider will help.
-Ferdy
Okay, silly question... where do I disable this? XD
-edit-
Nevermind, found it. Made a typo while searching in the web.config causing it to return no results.
Okay, I tried disabling the sitemap provider, but then I can no longer publish nodes as I get the following error on trying:
This feature is currently disabled, please enable section system.web/siteMap in the configuration file.
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: This feature is currently disabled, please enable section system.web/siteMap in the configuration file.
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:
Oops. On our prod. sites we disable it by removing the entire <siteMap /> element in web.config... not sure that just turning enabled to false works.
Ah, I thought that was a bit too drastic of a measure, so I figured I'd just set enabled to false haha. Anyway, I removed the entire element and it seems to work. I'll let you know how it goes!
-Ferdy
Unfortunately, it didn't solve our problem as it just happened again not five minutes ago.
Any other suggestions?
-Ferdy
I would start by hooking into all of the event handlers that the Access class has so you can debug and figure out where exactly it goes wrong. There's still the possibility that it's not even Umbraco-related, so at least you'd be able to find that out as well, here's a quick eventhandler to get you going (believe it should work in 4.5.2 as well):
Thanks Sebastian, I'll go implement it. Though, just a random thought, would it perhaps be smarter to check the CONTENTS of the Access.xml file? The file it self is still there afterall, it just either turns into a garbled mess or gets (partially) ignored.
Umbraco seems to still knows the page is for members only, it just doesn't seem to remember which page it has to redirect non logged in users towards.
-Ferdy
Ah I didn't read properly, didn't realize the file was just being corrupted.. So yeah, it would be better to check the content. Also make sure to compare the file when it was still correct to the file which has the corruption, that should narrow down where exactly the problem is introduced.
is working on a reply...