privatebool RunSite() { // Get the site SiteInfo site = SiteInfoProvider.GetSiteInfo("MyNewSite"); if (site != null) { // Start site SiteInfoProvider.RunSite(site.SiteName); returntrue; } returnfalse; }
The following example stops a site.
privatebool StopSite() { // Get the site SiteInfo site = SiteInfoProvider.GetSiteInfo("MyNewSite"); if (site != null) { // Stop site SiteInfoProvider.StopSite(site.SiteName); returntrue; } returnfalse; }