description | title | ms.custom | ms.date | ms.service | ms.reviewer | ms.suite | ms.topic |
---|---|---|---|---|---|---|---|
Learn more about: Troubleshoot Installation Issues with the SAP adapter |
Troubleshoot Installation Issues with the SAP adapter |
06/08/2017 |
biztalk-server |
article |
Installation of the Microsoft [!INCLUDEadapterpacknoversion] copies the product binaries on the computer and registers the bindings for each adapter. This section discusses troubleshooting techniques to resolve installation errors.
The [!INCLUDEadapterpacknoversion] setup program performs the standard task of installing the [!INCLUDEadapterpacknoversion]. Additionally, the setup also performs certain custom actions such as registering the adapter bindings. You can log messages for both the standard as well as custom actions that the setup performs.
-
The [!INCLUDEadapterpacknoversion] setup installs the adapter specific files using an MSI. Hence, the logging for the setup is the standard MSI logging.
-
Logs for the custom actions that the setup program performs are available at %TEMP%\adaptersetup.log. If the tracing to the log file fails, the traces are also available in the event log.
Problem
The Microsoft [!INCLUDEadapterpacknoversion] setup wizard fails to register the adapter bindings or the [!INCLUDEadoprovidersaplong], but proceeds with the adapter installation.
Cause
This might result due to problems with [!INCLUDEfirstref_btsWinCommFoundation] installation, [!INCLUDEafproductnamelong] installation, or the machine.config file being corrupt. The adapter bindings are written to the machine.config file.
Resolution
You should manually register the [!INCLUDEadaptersap_short] binding or the [!INCLUDEadoprovidersapshort].
-
Navigate to the machine.config file on the computer. For example, on a 32-bit platform, the machine.config is available under <system drive>:\WINDOWS\Microsoft.NET\Framework\<version>\CONFIG.
In this path, <version> is the version of the .NET Framework.
-
Open the file using a text editor.
-
To register the [!INCLUDEadaptersap_short] binding:
-
Search for the element "system.serviceModel" and add the following under it:
<client> <endpoint binding="sapBinding" contract="IMetadataExchange" name="sap" /> </client>
-
Search for the element "bindingElementExtensions" under system.serviceModel\extensions.
-
Look for the missing [!INCLUDEadaptersap_short] binding. Add the following section under the "bindingElementExtensions" node.
For [!INCLUDEadaptersap_short], add:
<add name="sapAdapter" type="Microsoft.Adapters.SAP.SAPAdapterExtensionElement,Microsoft.Adapters.SAP, Version=<version>, Culture=neutral, PublicKeyToken=<public key>" />
-
Search for the element "bindingExtensions" under system.serviceModel\extensions.
-
Look for the missing [!INCLUDEadaptersap_short] binding. Add the following section under the "bindingExtensions" node.
For [!INCLUDEadaptersap_short], add:
<add name="sapBinding" type="Microsoft.Adapters.SAP.SAPAdapterBindingSection,Microsoft.Adapters.SAP, Version=<version>, Culture=neutral, PublicKeyToken=<public key>" />
[!NOTE] For information about how to determine the public key, see Determining the Public Key and Version.
-
-
To register the [!INCLUDEadoprovidersapshort]:
-
Search for the element "DbProviderFactories" under the "system.data" node.
-
Look for the missing [!INCLUDEadoprovidersapshort]. Add the following section under the "DbProviderFactories" node.
For [!INCLUDEadoprovidersapshort], add:
<add name="SAPClient Data Provider" invariant="Microsoft.Data.SAPClient" description=".NET Framework Data Provider for mySAP Business Suite" type="Microsoft.Data.SAPClient.SAPClientFactory,Microsoft.Data.SAPClient, Version=<version>, Culture=neutral, PublicKeyToken=<public key>" />
-
-
Save and close the machine.config file.
Perform the following steps to determine the public key for [!INCLUDEadaptersap_short] or [!INCLUDEadoprovidersapshort].
-
Navigate to the Windows directory, typically C:\WINDOWS\assembly.
-
Right-click the DLL for which you want the public key, and then select Properties. The following table lists the name of the DLLs for [!INCLUDEadaptersap_short] and [!INCLUDEadoprovidersapshort].
Adapter/Data Provider Name of the DLL [!INCLUDEadaptersap_short] Microsoft.Adapters.SAP [!INCLUDEadoprovidersapshort] Microsoft.Data.SAPClient -
On the General tab, the value against the Public Key Token label specifies the public key for the DLL. Similarly, value against the Version label specifies the version number for the DLL.
-
Copy the public key, and then click Cancel.
Problem
Using the [!INCLUDEaddadapterservreflong] or the [!INCLUDEconsumeadapterservlong] from [!INCLUDEbtsVStudioNoVersion] on a 64-bit computer running 64-bit version of the [!INCLUDEadapterpacknoversion] results in the following error:
No valid adapters are installed on this machine
Cause
The [!INCLUDEadaptersap_short] is a WCF custom binding, which is registered under System.ServiceModel in the machine.config file. A 64-bit platform has two machine.config files, one used by the 32-bit applications and the other used by the 64-bit applications. So, when you install the 64-bit version of the [!INCLUDEadapterpacknoversion], the setup wizard registers the bindings in the 64-bit version of the machine.config file. However, [!INCLUDEbtsVStudioNoVersion] runs as a 32-bit process and hence when you launch the [!INCLUDEconsumeadapterservshort] from [!INCLUDEbtsVStudioNoVersion], the plug-in checks for the bindings in the 32-bit version of the machine.config file and fails giving an error.
Resolution
-
Install both the 32-bit and 64-bit versions of the [!INCLUDEadapterpacknoversion] on a 64-bit [!INCLUDEafproductnameshort] installation.
[!IMPORTANT] You must only have a 64-bit [!INCLUDEafproductnameshort] installation. Side-by-side installation of 32-bit and 64-bit [!INCLUDEafproductnameshort] on a single computer is not supported.
-
Add both the 32-bit and 64-bit versions of the client DLLs for the [!INCLUDEadaptersap_short] (such as librfc32u.dll) to the PATH variable. The 32-bit version of the DLLs must be added to C:\Windows\SysWow64 folder. The 64-bit version of the DLLs must be added to C:\Windows\System32 folder.
[!IMPORTANT] If the adapter (32 or 64-bit) is running on a computer that has a 64-bit operating system, and you are using the adapter to write an application, you should mark the application to the same type (32 or 64-bit) as the adapter. Also, the version of the RFC SDK (32 or 64-bit) must be same as the version of the adapter (32 or 64-bit).
For example, if a 32-bit adapter is running on a computer with a 64-bit operating system, the adapter client application must be marked as 32-bit.
For more information about the SAP client DLLs, see Install Custom RFCs for the Data Provider for SAP.
Problem
When you try to configure a port for the adapter in [!INCLUDEbtsBizTalkServerNoVersion] Administration console, you get the following error:
"Unable to create binding configuration element for editing. Check the values of the BindingType and BindingConfiguration properties.
(Microsoft.Biztalk.Adapter.Wcf.Converters.CreateBindingException) Unable to get binding type for binding extension "sapBinding".
Verify the binding extension is registered in machine.config."
Cause
The [!INCLUDEadaptersap_short] is a WCF custom binding, which is registered under System.ServiceModel in the machine.config file. A 64-bit platform has two machine.config files, one used by the 32-bit applications and the other used by the 64-bit applications. So, when you install the 64-bit version of the [!INCLUDEadapterpacknoversion], the setup wizard registers the bindings in the 64-bit version of the machine.config file. However, [!INCLUDEbtsBizTalkServerNoVersion] Administration console runs as a 32-bit process and hence when you configure a port for the adapter, it checks for the bindings in the 32-bit version of the machine.config file and fails giving an error.
Resolution
-
Install both the 32-bit and 64-bit versions of the [!INCLUDEadapterpacknoversion] on a 64-bit [!INCLUDEafproductnameshort] installation.
[!IMPORTANT] You must only have a 64-bit [!INCLUDEafproductnameshort] installation. Side-by-side installation of 32-bit and 64-bit [!INCLUDEafproductnameshort] on a single computer is not supported.
-
Add both the 32-bit and 64-bit versions of the client DLLs for the [!INCLUDEadaptersap_short] (such as librfc32u.dll) to the PATH variable. The 32-bit version of the DLLs must be added to C:\Windows\SysWow64 folder. The 64-bit version of the DLLs must be added to C:\Windows\System32 folder.
[!IMPORTANT] If the adapter (32 or 64-bit) is running on a computer that has a 64-bit operating system, and you are using the adapter to write an application, you should mark the application to the same type (32 or 64-bit) as the adapter. Also, the version of the RFC SDK (32 or 64-bit) must be same as the version of the adapter (32 or 64-bit).
For example, if a 32-bit adapter is running on a computer with a 64-bit operating system, the adapter client application must be marked as 32-bit.
For more information about the SAP client DLLs, see Install Custom RFCs for the Data Provider for SAP.