Connect to SAP gateway failed

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

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.


One Response to Connect to SAP gateway failed

  1. Brett says:

    Well researched. Will definitely bookmark this one for next time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: