Exemplo n.º 1
0
        private void DeleteIfExtant()
        {
            IisWebSite website = Iis.TryGetWebSiteByServerComment(Name.Value);

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

            if (webSite != null)
            {
                webSite.Stop();
                Thread.Sleep(Wait.Value);
            }
        }
Exemplo n.º 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();
            }
        }