public void Create_A_VirtualDiretory_withClassic() { var task = new Iis7Task { PathOnServer = "C:\\SomethingAwesome", ServerName = "localhost", VirtualDirectoryPath = "Victastic", WebsiteName = "SCOTT", AppPoolName = "VICKERS", //could be set on either website or vdir basis UseClassicPipeline = true }; DeploymentResult output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } }
public void Create_A_VirtualDiretory() { var task = new Iis7Task { PathOnServer = "C:\\SomethingAwesome", ServerName = "localhost", VirtualDirectoryPath = "Victastic", WebsiteName = "Default Web Site", AppPoolName = "VICKERS", //could be set on either website or vdir basis ManagedRuntimeVersion = ManagedRuntimeVersion.V4, Enable32BitAppOnWin64 = true }; DeploymentResult output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } }
public void NAME() { if (Directory.Exists(".\\bob")) { Directory.Delete(".\\bob", true); } Directory.CreateDirectory(".\\bob"); var task = new Iis7Task { PathOnServer = new DirectoryInfo(".\\bob"), ServerName = Environment.MachineName, VdirPath = "bob", WebsiteName = "Default Web Site" }; var output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } }
public override void Because() { var task = new Iis7Task { PathOnServer = NewPath, ServerName = WebServer, VirtualDirectoryPath = VirtualDirectory, AppPoolName = NewAppPool, ManagedRuntimeVersion = NewManagedRuntimeVersion, WebsiteName = WebSiteName, Enable32BitAppOnWin64 = New32bitOn64, UseClassicPipeline = NewManagedPipelineMode == ManagedPipelineMode.Classic }; var output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } LoadVirtualDirectory(); }
public override void Context() { Directory.CreateDirectory(OldPath); Directory.CreateDirectory(NewPath); var task = new Iis7Task { PathOnServer = OldPath, ServerName = WebServer, VirtualDirectoryPath = VirtualDirectory, AppPoolName = OldAppPool, ManagedRuntimeVersion = OldManagedRuntimeVersion, WebsiteName = WebSiteName, Enable32BitAppOnWin64 = Old32bitOn64, UseClassicPipeline = OldManagedPipelineMode == ManagedPipelineMode.Classic }; var output = task.Execute(); foreach (var item in output.Results) { Console.WriteLine(item.Message); } }