public int ExportWeb(string jobName, string webUrl, string dataPath, bool includeSubwebs, bool includeUserSecurity, bool overWrite, int cabSize)
{
// Check whether ExportWeb operation succeeds.
int exportWebResult = 0;
string exportUrl = webUrl;
string sutComputerName = Common.GetConfigurationPropertyValue(Constants.SutComputerName, this.Site);
// The server name in this URL must be in lowercase as specified in the Open Specification section 3.1.4.2.2.1.
exportUrl = exportUrl.Replace(sutComputerName, sutComputerName.ToLower(System.Globalization.CultureInfo.CurrentCulture));
// SharePoint services 2007 returns an error indicates the URL is not accessible if the transport portion is not in lowercase.
if (exportUrl.StartsWith("HTTP:", StringComparison.CurrentCultureIgnoreCase))
{
exportUrl = exportUrl.Substring(5);
exportUrl = "http:" + exportUrl;
}
else if (exportUrl.StartsWith("HTTPS:", StringComparison.CurrentCultureIgnoreCase))
{
exportUrl = exportUrl.Substring(6);
exportUrl = "https:" + exportUrl;
}
exportWebResult = this.service.ExportWeb(jobName, exportUrl, dataPath, includeSubwebs, includeUserSecurity, overWrite, cabSize);
// Verify the ExportWebResponse structure.
this.VerifyExportWeb(exportWebResult);
return exportWebResult;
}