Connect to SAP gateway failed

November 14, 2009

I received an error (in the windows event log) the other day when trying to configure a BizTalk receive location using the WCF LOB SAP adapter. The error looked like this:


The Messaging Engine failed to add a receive location "" with URL "" to the adapter "WCF-Custom".
Reason: "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_OK. ErrorGroup=RFC_ERROR_COMMUNICATION. SapErrorMessage=Connect to SAP gateway failed
Connect_PM TPNAME=, GWHOST=, GWSERV=

One solution (as suggested by MSDN) is to install the SAP client.

This solution works, but what is it about the SAP client install that is required by the WCF LOB SAP adapter? Why should you have to install the SAP client on a production server?

It turns out the SAP client modifies the following file: c:\windows\system32\drivers\etc\services, by making entries to resolving the SAP gateway host’s name (as used in BizTalk WCF SAP receive location’s URI) to the gateways address.

Once you manually modify this file to contain these entries the WCF SAP BizTalk receive location will work without having to install the SAP client.

Advertisements

Registry Access Permission

August 21, 2009

Ran in to a problem today which was being caused by the BizTalk server account’s registry permissions.

This is easily fixed by following these steps:

  • Open “Run” command.
  • Open “regedit“.
  • Navigate to Navigate to: \\MyComputer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
  • Right Click on the “EventLog” node and select “Permissions” from the context menu.
  • Add the service account (application pool ID or BizTalk host instance service account) to the list of users and give it a special permissions of (Query Value, Set Value, Create Subkey, Enumerate Subkeys, Notify, Read Control.

registry