title: Error message: "XmlSiteMapProvider is not initialized. Call Initialize() method first"
body: <p>the problem is that I have an override BuildSiteMap() function in a class called EditableSiteMapProvider, which is used to edit the Sitemap by removing or adding new nodes. and when i do base.BuildSiteMap();, it gives me an error "XmlSiteMapProvider is not initialized. Call Initialize() method first.</p>
  
  <pre><code>public override SiteMapNode BuildSiteMap()
      {
  
          SiteMapNode result = base.BuildSiteMap();
  
          //if (_loadFileNodes())
          //{
          //    lock(objLock)
          //    {
          //        base.Clear();
          //        result = base.BuildSiteMap();
          //        _dataFixInProgress = false;   
          //    }
          //}
  
          if (!_dataFixInProgress)// &amp;&amp; !_dataIsFixed)
          {
  </code></pre>
  
  <p>This function is called from the function Refresh() which is as follows:</p>
  
  <pre><code>public void Refresh(){
          Clear();
          this._loadFileNodes();
          BuildSiteMap();
      }
  </code></pre>
  
  <p>These two functions are in the class EditableSiteMapProvider and I use this function to refresh the sitemap from another page like files.aspx which is used to upload files to the database which also shows their name on the navigation bar. So to do that, I refresh the sitemap by calling the refresh function on Page Load of files.aspx.cs which looks all the new files uploaded and adds or removes the files link from the sitemap. </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
  
  
      DevExpress.Web.ASPxSiteMapControl.ASPxSiteMapControl smc = (DevExpress.Web.ASPxSiteMapControl.ASPxSiteMapControl)this.Master.FindControl("ASPxSiteMapControl1");
  
      Proj.Web.EditableXmlSiteMapProvider sitemap = new Proj.Web.EditableXmlSiteMapProvider();
      sitemap.Refresh();
  
  }
  </code></pre>