Problem about Biztalk SAP adapter running on 64-bit host instance.

Hi there

Both 32-bit and 64-bit host instances are running. We use WCF-Custom adapter to communicate with SAP. And for WCF-Custom adapter, we assigned a 64-bit host.

We copied all the library files in rfcsdk32bit to folder Windows\System32, and those in rfcsdk64bit to folder Windows\SysWOW64.

All is going just fine until we can not enable the receive location retrieving data from SAP with WCF-Custom adapter and BindingType sapBinding. Error information as below:

Reason: System.BadImageFormatException: Could not load file or assembly 'Microsoft.Adapters.SAP.SAPGInvoker.dll' or one of its dependencies.  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
File name: 'Microsoft.Adapters.SAP.SAPGInvoker.dll'
   at Microsoft.Adapters.SAP.SAPBinding.CreateBindingElements()
   at System.ServiceModel.Channels.Binding.CanBuildChannelListener[TChannel](BindingParameterCollection parameters)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfUtils.IsQueuedReceive(Binding binding)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url, IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)

This problem disappears right after we switch the host for WCF-Custom adapter back to a 32-bit host, which is for sure.

Some gudiance instructed: Both 32-bit rfcsdk library files and 64-bit rfcsdk library files need to be copied into both two directories above. But most of the filenames are overlapped obviously. How come they can exists under a same directory? Or do I just get the wrong 64-bit rfcsdk? Does anyone happen to have by hand? I already serach through SAP download site. My rfcsdk files list is below:

32-bit:

 icudt34.dll
 icuin34.dll
 icuuc34.dll
 librfc32u.dll
 librfc32u.lib
 libsapu16vc80.dll
 libsapucum.dll
 libsapucum.lib
 saprfc32.lib

 

64-bit:

icudt26l.dll
icuin26.dll
icuuc26.dll
librfc32u.dll
librfc32u.lib
libsapu16vc71.dll
libsapucum.dll
libsapucum.lib

 

Thanks

Gou Jun

December 17th, 2010 10:23am

Hi Gou Jun,

Are you using BizTalk Adapter 2.0 Pack? If so it best to check the installation guide (section For the SAP Adapter)  to see which dll's you need.

HTH

Regards,

Steef-Jan Wiggers
MVP & MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly

 

 

Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 11:54am

The SAP ports must run on 32bit, there is no way of setting them up on a 64bit host.
Afaik it's not a problem of the SAP SDK, it's a problem of the adapter pack itself. When you install the 64bit version the bindings are still missing. You will need to install the 32bit version and use this one.
December 17th, 2010 1:07pm

Guys

Finally I get it working.

According to the Installation Guide, you need to copy 32-bit rfcsdk library files into the directory Windows\SysWOW64, meanwhile 64-bit rfcsdk library files into the directory Windows\System32.

Don't know why. But it just happened.

Thanks

Gou Jun

  • Marked as answer by Jun Gou[MCTS] Monday, December 20, 2010 4:21 AM
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2010 7:21am

Hi Gou Jun:

I am facing the same issue. Do you have the RFC SDK for both 32 bit and 64 bit. If I download from SAP Market place I am getting the same DLL from both version. Thanks

 

April 7th, 2011 1:58am

hi All,

I'm facing the similar problem like above but not able to solve it by any means. Please check the following error message which im getting while trying to configure the WCF_SAP Adapter in 64-bit environment of BTS 2010

 

TITLE: BizTalk Server Administration
------------------------------

Exception has been thrown by the target of an invocation. (mscorlib)

------------------------------
ADDITIONAL INFORMATION:

An error occurred creating the configuration section handler for system.serviceModel/extensions: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 160) (System.Configuration)

------------------------------

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (mscorlib)


------------------------------

 

Please Suggest.

Thanks

 

Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 10:15pm

Have you installed C++ runtime as well? It says C++ runtime 2005 SP1 in SAP Note, but not sure if compiled and if it may require newer version. To be sure you can test to install all of them and see if it helps:

r3dllinst.exe = C++ runtime 2003/7.1 (from SAP note if using 6.40 or 7.00)

C++ runtime 2005 SP1

C++ runtime 2008 SP1

C++ runtime 2010 SP1

WindowsUpdate

 

Make sure you copy both 64-bit SAP RFC SDK unicode dlls to %WinDir%\System32 and the 32-bit SAP RFC SDK unicode dlls to %WinDir%\SysWOW64 folder.

 

Cheers

Niklas

April 19th, 2011 11:35pm

I had a similar problem, have been fighting with it for a week

Thanks a ton, It works now. :)

I followed the guide.


~~ I am using VS 2012 ~~
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2013 10:35am

The librfc32u.dll seems to be compiled against 4053 version (SP1 ATL security update) of C++ runtime so best to have that installed as well. So I would make sure to have x86 and x64 versions SP1 + MFC + ATL updates.

C++ redistributable 2005 SP1 x86 + x64 + security update(s)

X86 SP1 : http://www.microsoft.com/download/en/details.aspx?id=5638 

X64 ! SP1 : http://www.microsoft.com/download/en/details.aspx?id=18471 

X86 + x64 ATL security updates : http://www.microsoft.com/download/en/details.aspx?id=14431 

X86 + x64 MFC security updates : http://www.microsoft.com/download/en/details.aspx?id=26347 

  

C++ redistributable 2008 SP1 x86 + x64 + security update(s)

X86 SP1 : http://www.microsoft.com/download/en/details.aspx?id=55821 

X64 SP1 : http://www.microsoft.com/download/en/details.aspx?id=2092  

X86 + x64 ATL security updates : http://www.microsoft.com/download/en/details.aspx?id=11895 

X86 + x64 MFC security updates : http://www.microsoft.com/download/en/details.aspx?id=26368 

  

librfc32u.dll manifest is this when checking it out in VS:

---------

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

  <dependency>

    <dependentAssembly>

      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.4053" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

    </dependentAssembly>

  </dependency>

</assembly>

---------


June 6th, 2013 11:27am

Hi Gou Jun,

I got the same as yours questions, and i test this for two weeks

but i can not sure about my DLL's version

Would you please mail me your DLL 32-bit and 64-bit version files?

I look forward to receiving your reply.

my email: steven_1118@hotmail.com

Free Windows Admin Tool Kit Click here and download it now
January 12th, 2014 8:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics