WebDeploy v3.5 is now available for download, and there are a few features to consider in this minor release.
Load Balancer Support with Session Affinity
This feature allows WebDeploy to be used with load balancers like ARR supporting layer 7 (OSI application layer) session affinity. If the load balancer sends a session cookie to WebDeploy, WebDeploy will return this cookie to the load balancer to have it route subsequent requests to the proper publishing endpoint.
Here is an example for configuring the ARR load balancer to generate and send the session cookie to WebDeploy (no specific configuration is required for WebDeploy). Navigate to the server farm to configure using IIS Manager:
Enable client affinity under the server farm’s Server Affinity option:
Encrypting web.config Settings Post-Publish
A new EncryptWebConfig rule handler was created to encrypt connection strings within a web.config file before updating it on the destination. This rule handler applies to the following providers: appHostConfig provider, contentPath provider and iisApp provider. The EncryptWebConfig rule handler is disabled by default and can be enabled by clients. When this rule handler is enabled, WebDeploy uses the standard .NET framework RsaProtectedConfigurationProvider which relies on the default key container NetFrameworkConfigurationKey (other KeyContainers can also be used because WebDeploy supports provider name override).
Here is example usage with the default RsaProtectedConfigurationProvider:
msdeploy.exe –verb:sync –source:iisapp=”sourceTestSite” –dest:iisapp=”destinationTestSite” –EnableRule:EncryptWebConfig
App Offline Template
WebDeploy v3.5 adds an enhancement to the existing AppOffline rule which allows you to take an ASP.NET application offline before publishing. In this release, WebDeploy supports specifying the relative path to an app offline template file located on the destination system. This rule handler applies to the following providers: appHostConfig provider, contentPath provider and iisApp provider.The app offline template file can capture any static HTML content to be displayed for users while the app is offline. Here is example usage:
msdeploy.exe -verb:sync -source:iisApp=sourceApp -dest:iisApp=destApp,appOfflineTemplate="offlineTemplate.htm" -enablerule:AppOffline
WebDeploy v3.5 enables ETW logging for improved diagnosability with minimal impact for system resource consumption. The Error and ConnectionInfo channels are enabled by default, and additional Debug, Verbose, Info, and Warning channels can be enabled by Event Viewer configuration.
Here is an example for accessing and enabling Web Deploy ETW channels via Event Viewer under Applications and Services Logs\Microsoft\Windows\WebDeploy