Details
Description
Use case to setup websites and web applications to use net.pipe protocol and bindings along with others (e.g. HTTP and/or HTTPS)
Desired Behavior
The ability to use net.pipe protocol at the website and web application level
Actual Behavior
Only HTTP and HTTPS protocols are supported on websites
Web applications do not support enabled protocols
Cannot setup multiple enabled protocols at once
Workaround:
Execute the following powershell script after website/application configuration
Import-Module WebAdministration
|
|
# Add net.pipe to website's enabled protocols
|
$currentEnabledProtocols = Get-ItemProperty -Path "IIS:\Sites\$site" -Name enabledProtocols
|
if (-not $currentEnabledProtocols.Split(',').Contains('net.pipe')) {
|
Set-ItemProperty -Path "IIS:\Sites\$site" -Name enabledProtocols -Value "$currentEnabledProtocols,net.pipe"
|
}
|
|
# Add net.pipe to web applications's enabled protocols
|
$currentEnabledProtocols = Get-ItemProperty -Path "IIS:\Sites\$site\$app" -Name enabledProtocols.Value
|
if (-not $currentEnabledProtocols.Split(',').Contains('net.pipe')) {
|
Set-ItemProperty -Path "IIS:\Sites\$site\$app" -Name enabledProtocols -Value "$currentEnabledProtocols,net.pipe"
|
}
|
|
# Add net.pipe binding to website
|
if (-not ((Get-ItemProperty "IIS:\Sites\$site" -Name bindings.Collection) | ? { $_.protocol -eq 'net.pipe' -and $_.bindingInformation -eq 'webservices.internal.bango.com' })) {
|
New-ItemProperty -Path "IIS:\Sites\$site" -Name bindings -Value @{protocol = 'net.pipe'; bindingInformation = $bindingInformation }
|
}
|