cancel
Showing results for 
Search instead for 
Did you mean: 

.NET and Logon Groups

Former Member
0 Kudos

Hello everybody:

Maybe this question is very basic, but I have been reading a few documents and searching, yet I haven't found an answer.

Currently I'm working on a project using .NET and conecting to an aplication server; all the tests have been going fine. Now the customer is worried about availability of aplication servers and wonders whether if it is posible to use load balancing from a logon group to automatically determine an aplication server.

The question is:

1) Is this possible?

2) If it is possible, where can I find a guide on how to do it?

Thank you in advance for your help.

Regards,

Jorge Tello.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks a lot. I have tested and it runs successfully.

Former Member
0 Kudos

Hello,

Yes it is possible. Yo can make a connection with load balancing by specifing message server host name, group name and the system ID in the connection string instead of specifying a dedicated application server, for example:

string connString = "USER=hello PASSWD=world CLIENT=000 MSHOST=MYMessageServer R3NAME=PRO GROUP=Developer";

You can also use the helper class Destination to construct the connection string for you:

Destination dest = new Destination();

dest.SAPSystemName = "PRO";

dest.LogonGroup = "Developer";

dest.MsgServerHost = "MYMessageServer";

dest.Username = "hello";

dest.Password = "world";

dest.Client = 0;

Hope it helps,

Guangwei Li

Former Member
0 Kudos

Guangwei:

Thank you for your answer.

So I will have to edit this in the sapmsg.ini file, is this correct?

Best regards,

Jorge Tello.

Former Member
0 Kudos

No. In your C# program. Didn't you noticed that I was using the C# syntax in the above sample?

Regards,

Guangwei

Former Member
0 Kudos

Guangwei:

Thank you for your help.

Regards,

Jorge Tello.

Former Member
0 Kudos

Hi Guangwei Li,

while trying to connect sap with example given below i get following error.

"SAP.Connector.RfcCommunicationException: Connect to message server failed Connect_PM MSHOST=sapai0ci.fm.intel.com, R3NAME=AI0, GROUP=AI0_PUBLIC LOCATION CPIC (TCP/IP) on local host ERROR service 'sapmsAI0' unknown TIME Wed Aug 11 09:54:58 2004 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -3 MODULE ninti.c LINE 428 DETAIL NiPServToNo SYSTEM CALL getservbyname COUNTER 1 at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode) at SAP.Connector.SAPConnection.Open() at SAP.Connector.SAPLoginProvider.OpenSAPConnection(Page p, String connstr, Boolean persist) at LoadBalanceDemo.SAPLogin1.Login_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\loadbalancedemo\saplogin1.aspx.cs:line 94"

i have checked with my basis guy and all connection parameters i.e message server host namem, sap system name etc are correct. can you tell me if any setting needs to be done in saplogon.ini or sapmsg.ini file.

waiting for ur reply.

thanks and Regards,

yashpal.

Former Member
0 Kudos

Hi,

It sounds like that the entry

sapmsAI0 xxxxx/tcp

has not been matained in the file

<WinDir>\system32\drivers\etc\services, where xxxxx is the

tcp port for the SAP message server in concern. Please ask your sysadmin for the value of the port number.

Regards,

Guangwei