Sometimes I get an exception after recompile when trying to refresh 2 or more pages a time.
I found the issue, it's in mojoSiteMapProvider.cs:
public override SiteMapNode BuildSiteMap()
{
if (rootNode != null)
{
return rootNode;
}
lock (objLock)
{
[init rootNode]
}
[...]
}
As checking for null is not under lock(), 2 threads check simultaneously and then try, one after another, to initialize it 2 times. The second attempt throws an exception.
P.S. And why do you create special object objLock instead of just lock(this)?