cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Silent logon doesn't work anymore

Former Member
0 Kudos

Hi

I could log on to SAP with a silent log on with this code

        Dim R3 As Object

        Dim SilentLogon As Boolean = True

        R3 = CreateObject("SAP.Functions")

        R3.Connection.SYSTEM = sapSystemId

        R3.Connection.Client = sapNumber

        R3.Connection.User = sapUser

        R3.Connection.Password = sapPassword

        R3.Connection.Language = "EN"

        If R3.connection.logon(0, SilentLogon) <> True Then

            MessageBox.Show("Logon to SAP failed!" & vbCrLf & vbCrLf _

                            & "Please check: " & vbCrLf & vbCrLf _

                            & "1. Your Credentials" & vbCrLf _

                            & "2. Your Internet Connection", "Logon Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        Else

            MessageBox.Show("Logon to SAP succeeded!", "Logon Success", MessageBoxButtons.OK, MessageBoxIcon.Information)

            R3.connection.logoff()

        End If

But now, this doesn't work anymore

When I try to logon with silentlogon = false I get the popup window and I can log on normally.

Does anybody know what might go wrong here?

Thanks

Ton

Accepted Solutions (0)

Answers (3)

Answers (3)

hynek_petrak
Active Participant
0 Kudos

Ask your basis whether the gateway process is running. It's mandaTory for non dialog connections

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ton,

the problem with silent logon is that it does not show errors, which is bad. Following Hynek's suggestion, will show you the cause in the logs.

However, my recommendation is to switch to an NCo 3.0 based solution and not to stay on the old  stuff. See https://service.sap.com/connectors -> SAP Connector for Microsoft .NET and there version 3.0.

Best regards,

Markus

hynek_petrak
Active Participant
0 Kudos

Hi,

try to increase the tracelevel and see the log files for details ....

R3.Connection.tracelevel = 1


http://help.sap.com/saphelp_46c/helpdata/en/d8/44caf9ac3c11d189c60000e829fbbd/content.htm?frameset=/...