Recently I was deploying a Windows Service that uses SAP .NET Connector 3.0 on a fresh install of Windows (the specific version isn’t important, but it was Windows Server 2003). I built my installer package, installed .NET Framework 4, and installed my program. When it came time to execute my service, I received the following error message.
System.TypeInitializationException: The type initializer for 'SAP.Middleware.Connector.RfcServerManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SAP.Middleware.Connector.RfcConfigParameters' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'sapnco_utils.dll' or one of its dependencies. The specified module could not be found. at SAP.Middleware.Connector.RfcConfigParameters..cctor() --- End of inner exception stack trace --- at SAP.Middleware.Connector.RfcConfigParameters.Initialize() at SAP.Middleware.Connector.RfcServerManager..cctor() --- End of inner exception stack trace --- at SAP.Middleware.Connector.RfcServerManager .GetServer(String serverName, Type rfcFunctionHandlers) at DataXstream.AwesomeProduct.InitializeSap()
What was really confounding was that the Fusion Log reported no .NET binding errors! So, what was going on?