Saturday, 6 June 2020

Migration issues for SAP.Connector.dll from Win 2003 to Win 2019 server


Recently I got task of migration of asmx web services from windows 2003 to windows 2019 server. These web services fetch data from SAP using SAP.Connector dll version 2.0. One of the asks was to do apple to apple migration, no code changes and enhancements.
Following are the issues I faced and resolution for same. it might be helpful for someone.
    
1. After migration of service I tried to consume web service using console application, first error I got is Unable to load DLL librfc32.dll: The specified module could not be found. I searched dll on windows 2003 server and observed that it is part of SAP GUI installation, so I have installed it on windows 2019 server however still got the same error.




Resolution: There is new librfc32.dll version available for 64-bit machine which we need to put/replace in C:\Windows\System32. 

2. Second error I got is Connect to message server failed

Errors Occurred. Error Description: SAP.Connector.RfcCommunicationException: Connect to message server failed
Connect_PM  MSHOST=*****, R3NAME=****, GROUP=****

ERROR       service '?' unknown
TIME        Tue Jun 02 09:48:52 2020
RELEASE     720
COMPONENT   NI (network interface)
VERSION     40
RC          -3
DETAIL      NiErrSet
COUNTER     2

   at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding)
   at SAP.Connector.SAPConnection.Open()

Resolution: We need to update ‘services’ file under ‘C:\Windows\System32\drivers\etc' with message server host name and port.

3. Third error I got is AccessViolationException

System.AccessViolationException
   at System.StubHelpers.MngdNativeArrayMarshaler.ConvertContentsToManaged(IntPtr, System.Object ByRef, IntPtr)
   at SAP.Connector.RfcApi.RfcCallReceive(Int32, System.String, SAP.Connector.RFC_PARAMETER[], SAP.Connector.RFC_PARAMETER[], SAP.Connector.RFC_TABLE[], System.String ByRef)
   at SAP.Connector.SAPClient.RfcInvoke(System.String, System.Object[])


Resolution: We need to configure web services application to run in 32-bit mode instead of
64- bit, due to old version of SAP.Connector.dll.  

No comments:

Post a Comment

Migration issues for SAP.Connector.dll from Win 2003 to Win 2019 server

Recently I got task of migration of asmx web services from windows 2003 to windows 2019 server. These web services fetch data from SAP us...