在与 SAP 质量系统连接时,它给出的异常是 ConnectionException 被捕获。详情如下:
详细信息:错误代码=RFC_OK。错误组=RFC_ERROR_COMMUNICATION。SapErrorMessage=SAP_CMINIT3 : rc=20 > 连接到 SAP 网关失败
Connect_PM GWHOST= IP地址地址,GWSERV=sapgw02,SYSNR=02
LOCATION CPIC (TCP/IP) 在本地主机上使用 Unicode
错误合作伙伴“IP地址”未到达
App.Config 中的连接字符串是:
value="sap://CLIENT=643;SYSTEM ID=QSG;LANG=;@A/**IPAddress**/01"
value="sap://CLIENT=643;SYSTEM ID=QSG;LANG=;@A/**IPAddress**/02"
key="userid" value="UserName"
key="password" value="Password"
程序代码
SAPBinding binding = new SAPBinding();
//SAPBinding binding1 = Skelta.SAPConnector.SAPAdapter.SAPConnection.binding;
binding.ReceiveTimeout = TimeSpan.MaxValue;
binding.SendTimeout = TimeSpan.MaxValue;
binding.EnableBusinessObjects = true;
binding.EnableSafeTyping = true;
EndpointAddress address = new EndpointAddress(SAPConnectionString);
ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>(binding, address);
// add credentials
factory.Credentials.UserName.UserName = SAPUserName;
factory.Credentials.UserName.Password = SAPPassword;
// Open client
factory.Open(TimeSpan.MaxValue);
//get a channel from the factory
irc = factory.CreateChannel();
//open the channel
try
{
irc.Open(TimeSpan.MaxValue);
}
请帮我