public void Delete(bool recursive) { if (PhysicalDirectory.Exists) { PhysicalDirectory.Delete(recursive); } }
public override void Stop() { _server.Stop(); if (RemoveSiteWhenStop) { PhysicalDirectory.Delete(true); } }
public override void Stop() { using (var server = new WebServerIIS(_settings)) { var app = server.DefaultWebSite.Applications.FirstOrDefault(a => a.Path == "/" + VirtualPath); if (app != null) { server.DefaultWebSite.Applications.Remove(app); server.ServerManager.CommitChanges(); } server.Stop(); } if (RemoveSiteWhenStop) { PhysicalDirectory.Delete(true); } }