cancel
Showing results for 
Search instead for 
Did you mean: 

Name or password is incorrect (repeat logon)

Former Member
0 Kudos
14,035

Hello,

I am developing a client application using visual studio 2010 express edition and sap connector 3.0. I keep getting the error message: "Name or password is incorrect (repeat logon)", which is actually not the correct message since the login parameters are correct. I am using a windows form to get login informaion from the user and a static class to maintain the destination.

Here is the code snippet:

public static void SetRfcDestination()

{

RfcDestinationManager.RegisterDestinationConfiguration(new ECCDestinationConfig());

sapRfcDestination = RfcDestinationManager.GetDestination("");

sapRfcRepository = sapRfcDestination.Repository;

}

Can someone please suggest what could be the actual problem?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

What are the parameters that you use to logon to SAP system?

Like for example

Client : 100

Hostname:xyzabcd

RFC destination: dcdsccwfcew

user id: abcds

pwd: xxxxxxxxxx

Looks like your program is trying to logon to different client.

Thanks & regards

bala

Former Member
0 Kudos

Hello,

This is the function I am using to gather the parameters:

public RfcConfigParameters GetParameters(string destinationName)

{

RfcConfigParameters parameters = new RfcConfigParameters();

parameters.Add(RfcConfigParameters.User, StaticClass.username);

parameters.Add(RfcConfigParameters.Password, StaticClass.password);

parameters.Add(RfcConfigParameters.AppServerHost, StaticClass.saprouter + StaticClass.host);

parameters.Add(RfcConfigParameters.SystemNumber, StaticClass.sysnr);

parameters.Add(RfcConfigParameters.Language, StaticClass.language);

return parameters;

}

If I use a configuration file with the above parameters like below, I am able to connect by using:

sapRfcDestination = RfcDestinationManager.GetDestination("DEV");

Config file setting:

<SAP.Middleware.Connector>

<ClientSettings>

<DestinationConfiguration>

<destinations>

<add NAME="DEV" USER="usernam" PASSWD="password" CLIENT="200" ASHOST="/H/123.108.47.82/H/10.0.2.51" SYSNR="00" LANG="EN"/>

</destinations>

</DestinationConfiguration>

</ClientSettings>

</SAP.Middleware.Connector>

Please suggest as I dont want to use a config file as the requirement is to collect the informaiton from the user in a login page.

Thanks

Former Member
0 Kudos

Hello

Did you test the user id to logon to SAP system directly thru SAPGUI before you start the testing?

Thanks & regards

bala

Former Member
0 Kudos

Yes, I can connect using the SAPGUI and if I use the config file. But not using RfcConfigParameters strangely.

Former Member
0 Kudos

Hello

Can you check the RFC destination that you use contains the right client number? Because it looks like the client number is not getting carried with your input. Or try creating the same user id with the same password in all the other clients. So that we will have a clear picture.

Thanks & regards

bala

Former Member
0 Kudos

Hello Bala,

Thanks for replying. I checked the client # and it is set to 200 and also checked the config parameters. It's working fine when I am using the config file. But it's giving an error with config parameters. Is there any required information that I might be missing?

Thanks

Former Member
0 Kudos

Hello Bala,

You are absolutely correct. I was not passing the client number at all as such the connection was failing. Thanks a million for pointing out this silly mistake.

Thanks a lot for your help

Answers (0)