The RFCServer class supports SAP connection with SSO and SNC.
The RFCServer class works similarly to the R3Connection class, see ERPConnect with SSO with SNC.

Note: Note the prerequisites described in SSO with SNC - Prerequisites beschrieben.

SAP Connection with SSO and SNC #

The RFCServer class provides the property SNCSettings. Assign the partner name in the SAP transaction SM59 (e.g. p:RFCServerSNC@THEOBALD) to the property OwnName of SNCSettings.

RFCServer rfcServer = new RFCServer();
rfcServer.GatewayHost = "";
rfcServer.GatewayService = "sapgw00";
rfcServer.ProgramID = "SNCTEST";
rfcServer.SNCSettings.Enabled = true;
rfcServer.SNCSettings.Mechanism = SNCMechanism.Kerberos5;
rfcServer.SNCSettings.OwnName = "p:RFCServerSNC@THEOBALD";
rfcServer.Protocol = ClientProtocol.RFC;
rfcServer.CanReceiveIdocs = true;
rfcServer.IsUnicode = true;


Note: If SNC is used with Kerberos and Active Directory, the Active Directory account used for the RFC server must have a Service Principal Name corresponding to the partner name in SAP.