Beispiel #1
0
        private void DeleteIfExtant()
        {
            IisWebSite website = Iis.TryGetWebSiteByServerComment(Name.Value);

            if (website != null)
            {
                website.Delete();
            }
        }
Beispiel #2
0
        public override void Build()
        {
            IisWebSite webSite = Iis.TryGetWebSiteByServerComment(Name.Value);

            if (webSite != null)
            {
                webSite.Stop();
                Thread.Sleep(Wait.Value);
            }
        }
Beispiel #3
0
        public override void Build(IBounce bounce)
        {
            DeleteIfExtant();
            IisWebSite webSite = Iis.CreateWebSite(Name.Value, ToInternalBindings(Bindings.Value), Path.GetFullPath(Directory.Value));

            SetupVirtualDirectory(webSite.VirtualDirectory);

            if (Started.Value)
            {
                webSite.Start();
            }
        }