Hi,
I want to login SAP from a form application in C#. But I cant login. I see error messages. So;
An unhandled exception of type 'SAP.Connector.RfcCommunicationException' occurred in SAP_Urun_Agacı_Login.exe
Additional information: SAP_CMINIT3 : rc=20 > Connect to SAP gateway failed
Connect_PM GWHOST=elksappr, GWSERV=sapgw06, SYSNR=06
LOCATION CPIC (TCP/IP) on local host
ERROR partner '10.3.10.152:3306' not reached // erişilemedi
TIME Thu Feb 19 13:10:46 2015
RELEASE 730
COMPONENT NI (network interface)
VERSION 40
RC -10
MODULE nixxi.cpp
LINE 3286
DETAIL NiPConnect2: 10.3.10.152:3306
SYSTEM CALL connect
ERRNO 10061
ERRNO TEXT WSAECONNREFUSED: Connection refused // bağlantı reddedildi
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
my codes;
try
{
string connStr1 = "ASHOST={0} SYSNR={1} CLIENT={2} LANG={3} USER={4} PASSWD={5}";
string connStr2 = "ASHOST={0} R3NAME={1} CLIENT={2} GROUP={3} USER={4} PASSWD={5}";
string srvHost = "elksappr";
string sysNum = "060";
string client = "060";
string language = "TR";
string msgSrv = null;
string logonGroup = null;
string r3Name = null;
string userName = "erdemu";
string pwd = "erd321-5";
string text1 = string.Empty;
if (srvHost != null)
{
text1 = String.Format(connStr1, srvHost, sysNum, client, language, userName, pwd);
}
else
{
if (msgSrv == null)
{
throw new Exception("Could not for a valid connection string");
}
text1 = String.Format(connStr2, msgSrv, r3Name, client, logonGroup, userName, pwd);
}
SAPConnection connection1 = new SAPConnection(text1);
connection1.Open();
//connection1.Close();
}
catch (Exception exception1)
{
throw exception1;
//MessageBox.Show("Bağlantı Engellendi");
}
}
}
I hope your help,
Best regards.