简体   繁体   中英

CONNECT:Direct Could not establish a connection to server

Note:Answering my own problem here to help people in future

When running an application after installing it on a new PC and using ConnectDirect to transfer files from Windows to Unix I am seeing the error message:

System.Runtime.InteropServices.COMException (0x00000009): Could not establish a connection to server Could not establish a connection to server

It happens on the Connect method:

在此处输入图片说明

See below to solve it.

You need to add a registry key here:

在此处输入图片说明

Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct]

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes]

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes\**CDServer.example.com**] "CDName"="**CDServer**" "ApiVersion"=dword:0000107f "SecurePlusVersion"=dword:00000000 "CompLevel"=dword:00000001 "SelectedOSType"=dword:00000000 "OSType"=dword:00000002 "SubType"=dword:00000000 "Server"="**CDServer**" "DefaultProtocol"="TCPIP" "DefaultUserid"="**CDPassword**"

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes\**CDServer.example.com**\Protocols]

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes\**CDServer.example.com**\Protocols\TCPIP] "TcpAddress"="**CDServer.example.com**;1363"

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes\**CDServer.example.com**\Userids]

[HKEY_USERS\S-1-5-21-3499964120-3315823391-1593708255-109682\Software\Sterling Commerce CONNECT:Direct\Nodes\**CDServer.example.com**\Userids\**CDPassword**] "Password"="6 XFWmtqzo5" "Temporary"=dword:00000000 "RememberPW"=dword:00000001

Before you import the the registry file you will need to replace the Windows User ID with the Users PC you're about to import the file in.

The Windows User ID hardcoded in the file is 109682 , to find the Windows User ID of the Users PC find it here:

HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\hivelist

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM