Esempio n. 1
0
        public void AddHttpsBindingToIssNullProtocol()
        {
            ITaskContext           context            = new TaskContext(new SimpleTaskContextProperties(), new string[0]);
            var                    master             = new IisMaster(context);
            IIisTasksFactory       factory            = master.LocalIisTasksFactory;
            IAddWebsiteBindingTask controlWebsiteTask = factory.AddWebsiteBindingTask;

            Assert.Throws <TaskExecutionException>(() => controlWebsiteTask
                                                   .SiteName("Default Web Site")
                                                   .Execute(context));
        }
Esempio n. 2
0
        public void AddHttpsBindingToIss()
        {
            ITaskContext           context            = new TaskContext(new SimpleTaskContextProperties(), new string[0]);
            var                    master             = new IisMaster(context);
            IIisTasksFactory       factory            = master.LocalIisTasksFactory;
            IAddWebsiteBindingTask controlWebsiteTask = factory.AddWebsiteBindingTask;

            controlWebsiteTask
            .SiteName("Default Web Site")
            .AddBinding("https")
            .Execute(context);
        }