我收到错误:
与底层事务管理器的通信失败
当我试图从visual studio 2010运行我的应用程序.我在谷歌搜索此问题,我已尝试所有可能的解决方案来解决此错误.
在这里,我改变了我的DTC属性.
-- Network DTC Access
-- Allow Inbound
-- Allow Outbound
-- Allow Remote Administrator
-- Allow Remote Clients
-- No Authentication Required
-- Enable XA Transaction
-- Enable SNA LU 6.2 Transaction
Run Code Online (Sandbox Code Playgroud)
如果有人知道这个问题的解决方案,请告诉我.
谢谢Manoj Sitapara
查看MSDTC 故障排除指南,其中将重复的 CID 列为潜在问题。您可以使用以下 Powershell 脚本来检测重复的 CID,并在需要时使用 WinRM 重新安装 MSDTC:
write-host "Checking for duplicate CIDs and reinstalling MSDTC if needed."
$servers = "server1","server2","server3"
$CIDs = Invoke-Command -ComputerName $servers -ScriptBlock { gci Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT\CID | foreach { $_.Name } | Out-String -Stream } #Array of all CIDs on all servers
$UniqueCIDs = $CIDs | select -Unique
if($CIDs.Length -eq $UniqueCIDs.Length){
Write-Output "All CIDs are unique, so we don't need to reinstall MSDTC"
} else {
Write-Output "Found duplicate CIDs, so we need to reinstall MSDTC on all VMs"
Invoke-Command -ComputerName $servers -ScriptBlock {
write-output "`r`nUninstalling MSDTC to regenerate CIDs on $env:computername"
msdtc -uninstall | Write-Output
sleep 25 #wait for previous command to finish
write-output "`r`nReinstalling MSDTC to regenerate CIDs on $env:computername"
msdtc -install | Write-Output
sleep 25 #wait for previous command to finish
write-output "`r`nSetting MSDTC service to automatic on $env:computername"
Set-Service msdtc -startuptype "auto"
write-output "`r`nWARNING: $env:computername may need to be restarted for changes to take effect."
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
31564 次 |
| 最近记录: |