Release Management 2013在尝试执行我的Power Shell DSC部署脚本时,将“输入不是有效的Base-64字符串”错误消息写入应用程序事件日志。有谁知道可能导致此错误的原因?
PS DSC脚本:
$ConfigData = @{
AllNodes = @(
@{
NodeName = $env:COMPUTERNAME
}
)
}
Configuration WebAppServer
{
Node $AllNodes.NodeName
{
File WebApplicationFiles
{
Ensure = "Present"
Type = "Directory"
Recurse = $true
SourcePath = $applicationPath
DestinationPath = "C:\inetpub\wwwroot\Test"
}
}
}
WebAppServer -ConfigurationData $ConfigData
来自应用程序日志的错误消息:
Timestamp: 9/29/2015 5:19:32 PM
Message: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. : \r\n\r\n at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at Microsoft.TeamFoundation.Release.Data.Helpers.CryptoHelper.GetDecryptedValue(String str, String containerName)
at Microsoft.TeamFoundation.Release.Data.Helpers.CryptoHelper.DecryptString(String str, String cryptoContainerName, String key, Encryption encryption)
at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.ReplaceConfigurationVariable(String content, Boolean isHideEncryptedVariable, String value, String token, Boolean isPassword)
at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.ReplaceConfigurationVariablesImplementation(String content, Boolean isHideEncryptedVariable)
at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.InstallComponentImplementation(Func`3 replaceConfigurationVariables, IDictionary`2 installers)
at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.DeployComponent()
Category: General
Priority: -1
EventId: 0
Severity: Error
Title:
Machine: CAE-ATX-TFS01
Application Domain: ReleaseManagementMonitor.exe
Process Id: 1932
Process Name: D:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\bin\ReleaseManagementMonitor.exe
Win32 Thread Id: 10148
Thread Name:
Extended Properties:
答案 0 :(得分:1)
我过去见过这个。输入密码时,请确保密码星号(*****
)的长度变为非常长的值。这表明它正确加密了密码。我已经看到加密事件无论出于什么原因都不会触发的情况。
您可以通过保存模板,关闭模板,重新打开模板,然后再次输入密码来解决此问题。
答案 1 :(得分:0)
您是迁移服务器还是恢复旧数据库?
请尝试在发布定义中的vNext操作中重新输入密码(任何加密值)。
Release Management正在尝试调用powershell操作并且在那里失败,并且它与您的脚本无关。可能,加密的密码字段已使用与RM现在不同的密钥加密。