Iis7Binding Class | MSBuild Extension Pack Help 4.0.12.0 |
Add (Required: Name, BindingInformation or (CertificateHash and CertificateStoreName) Optional: BindingProtocol)
CheckExists (Required: Name, BindingInformation Optional: BindingProtocol Output: Exists, BindingProtocol
Modify (Required: Name, BindingInformation, PreviousBindingProtocol, PreviousBindingInformation)
Remove (Required: Name Optional: BindingProtocol)
Remote Execution Support: Yes
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.WebIis7Binding
Namespace: MSBuild.ExtensionPack.Web
Assembly: MSBuild.ExtensionPack.Iis7 (in MSBuild.ExtensionPack.Iis7.dll) Version: 4.0.0.0
The Iis7Binding type exposes the following members.
Name | Description | |
---|---|---|
Iis7Binding |
Name | Description | |
---|---|---|
BindingInformation |
String containing binding information.
Format: ip address:port:hostheader Example: *:80:sample.example.com or : *:443: | |
BindingProtocol |
Binding protocol. Example: "http", "https", "ftp". Default is http.
| |
CertificateHash |
If HTTPS is used, this is the certificate hash. This is the value of "thumbprint" value of the certificate you want to use.
Format: hash encoded string. Hex symbols can be space or dash separated. Example: 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | |
CertificateStoreName |
The name of the certificate store. Default is "MY" for the personal store
| |
Exists |
Gets whether the binding exists
| |
Name |
Sets the name of the Website
| |
Port |
Sets the port of the Binding to Modify
| |
PreviousBindingInformation |
Sets the PreviousBindingInformation to use when calling Modify
| |
PreviousBindingProtocol |
Sets the PreviousBindingProtocol to use when calling Modify
|
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <Target Name="Default"> <!-- Add a binding --> <MSBuild.ExtensionPack.Web.Iis7Binding TaskAction="Add" Name="NewSite" BindingInformation="123.123.11.33:234:www.freet2odev.com" BindingProtocol="http"/> <!-- Check whether a binding exists--> <MSBuild.ExtensionPack.Web.Iis7Binding TaskAction="CheckExists" Name="NewSite" BindingInformation="123.123.11.33:234:www.freet2odev.com" BindingProtocol="http"> <Output TaskParameter="Exists" PropertyName="DoesExist"/> </MSBuild.ExtensionPack.Web.Iis7Binding> <Message Text="Exists: $(DoesExist)"/> <!-- Add another binding --> <MSBuild.ExtensionPack.Web.Iis7Binding TaskAction="Add" Name="NewSite" BindingInformation="123.123.33.33:455:www.freet2odev.com" BindingProtocol="http"/> <!-- Modify the binding --> <MSBuild.ExtensionPack.Web.Iis7Binding TaskAction="Modify" Name="NewSite" PreviousBindingProtocol="http" PreviousBindingInformation="123.123.11.33:234:www.freet2odev.com" BindingInformation="5.5.55.5:111:www.newmod.com" BindingProtocol="http"/> <!-- Remove the binding --> <MSBuild.ExtensionPack.Web.Iis7Binding TaskAction="Remove" Name="NewSite" BindingInformation="123.123.33.33:455:www.freet2odev.com" BindingProtocol="http"/> </Target> </Project>