cancel
Showing results for 
Search instead for 
Did you mean: 

RfcConfigParameters type initialization error

CSonek
Discoverer
0 Kudos

Hi all,

I'm using the NCo 3.0 connector within an ASP.NET Service, but the initialization of the configuration

failed with an type initialization exception of the class RfcConfigParameters.

When I'm calling my code from a console application, everything works fine.

Does anybody know this problem and how to solve it?

Regards,

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

fjhernanz
Contributor
0 Kudos

Hi Christian,

Can you please copy & paste here the full exception?

Br,

Javier

CSonek
Discoverer
0 Kudos

Hi Javier,

here's the stacktrace:

sapnco 3.0.2.0 0 Application Error THREAD14 SAP.Middleware.Connector.RfcConfigParameters. error in line 0: Der Typeninitialisierer für "SAP.Middleware.Connector.RfcConfigParameters" hat eine Ausnahme verursacht. bei SAP.Middleware.Connector.RfcConfigParameters..ctor()

bei Mag.Mcc.EAI.IntegrationEngine.Sap.NCoConnection.InitializeConfiguration(String destinationName, String applicationServer, String router, String userName, String password, Int32 client, Int32 systemNumber)

bei Mag.Mcc.EAI.IntegrationEngine.Sap.NCoConnection.InitializeConfiguration(Int32 maRefnr, String destinationName)

bei Mag.Mcc.EAI.IntegrationEngine.Sap.NCoConnection.RegisterDestination(Int32 maRefnr, String destinationName)

...

System.Threading.ThreadHelper.ThreadStart_Context - Line 0

System.Threading.ExecutionContext.runTryCode - Line 0

System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup - Line 0

System.Threading.ExecutionContext.RunInternal - Line 0

System.Threading.ExecutionContext.Run - Line 0

System.Threading.ThreadHelper.ThreadStart - Line 0

System.Configuration.ConfigurationManager.OpenExeConfigurationImpl error in line 0: exePath muss angegeben werden, wenn er nicht innerhalb einer eigenständigen EXE-Datei ausgeführt wird. bei System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath)

bei System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel userLevel)

bei SAP.Middleware.Connector.RfcConfigParameters..cctor()

Regards,

Christian

fjhernanz
Contributor
0 Kudos

Hi Christian,

If nobody has a different approach, I would recommend to open an oss message about this problem. It seems quite recent as I've only found a current case with this stack. It seems it'll be fixed in NCo 3.0.4 for .NET 4.0 but maybe the colleagues can provide a temporary fix for it. In case you go ahead with it, please raise the message under BC-MID-CON-NCO component.

Br,

Javier