[WebMethod (true)] //Below method takes around 5-10 minutes in execution public string[] GenerateXMLSiteMap() { SiteMapGenerator siteMapGen = new SiteMapGenerator(); siteMapGen.SiteMapNodeAddedSuccessfully += new SiteMapNodeAdded(siteMapGen_SiteMapNodeAddedSuccessfully); siteMapGen.GenerateSiteMap(); return GetStats(); } void siteMapGen_SiteMapNodeAddedSuccessfully(string[] infos) { //CurrentPage = infos[0]; Session["CurrentPage"] = infos[0]; Session["PageScanned"] = infos[1]; Session["LinkDepth"] = infos[2]; Session["Time"] = infos[3]; } [WebMethod (true)] public string[] GetStats() { string[] stats = new string[4]; if (Session["CurrentPage"] != null) { stats[0] = Session["LinkDepth"].ToString(); stats[1] = Session["CurrentPage"].ToString(); stats[2] = Session["PageScanned"].ToString(); stats[3] = Session["Time"].ToString(); } return stats; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)