尝试执行 vNext 部署脚本时出现 Base-64 错误
Base-64 error when trying to execute vNext deployment script
Release Management 2013 在尝试执行我的 Power Shell DSC 部署脚本时将 "The input is not a valid Base-64 string" 错误消息写入应用程序事件日志。有谁知道是什么导致了这个错误?
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:
您是否迁移了服务器或恢复了旧数据库?
尝试在发布定义的 vNext 操作中重新输入密码(任何加密值)。
Release Management 正在尝试调用 powershell 操作但失败了,这与您的脚本无关。可能,加密密码字段已使用与 RM 现在不同的密钥加密。
我以前见过这个。输入密码时,请确保密码星号 (*****
) 的长度更改为非常长的值。这表明它正确加密了密码。我见过加密事件因任何原因而未触发的情况。
您可以通过保存模板、关闭模板、重新打开模板,然后再次输入密码来解决这个问题。
Release Management 2013 在尝试执行我的 Power Shell DSC 部署脚本时将 "The input is not a valid Base-64 string" 错误消息写入应用程序事件日志。有谁知道是什么导致了这个错误?
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:
您是否迁移了服务器或恢复了旧数据库?
尝试在发布定义的 vNext 操作中重新输入密码(任何加密值)。
Release Management 正在尝试调用 powershell 操作但失败了,这与您的脚本无关。可能,加密密码字段已使用与 RM 现在不同的密钥加密。
我以前见过这个。输入密码时,请确保密码星号 (*****
) 的长度更改为非常长的值。这表明它正确加密了密码。我见过加密事件因任何原因而未触发的情况。
您可以通过保存模板、关闭模板、重新打开模板,然后再次输入密码来解决这个问题。