public RequestUri BeginUpgrade(DeploymentSlotUri deploymentUri, DeploymentConfiguration configuration)
{
OurTrace.TraceVerbose("BeginUpgrade");
var xml = configuration.MakeUpgradeDeploymentMessage();
OurTrace.TraceInfo(xml);
var response = _http.Post(deploymentUri + "/?comp=upgrade", xml);
var statusCode = response.StatusCode;
if (statusCode.IsAccepted())
return deploymentUri.ToRequestUri(response.AzureRequestIdHeader);
if (statusCode.IsConflict())
return null;
ThrowUnexpectedHttpResponse(response);
return null; // can't be reached.
}