Hello,
I am using the NCo 3.0 with VS2010 and .Net 4. I am able to make RFC calls using the following code:
var par = new RfcConfigParameters();
//config par here
....
var dest = RfcDestinationManager.GetDestination(par);
This works fine, and I am able to successfully call my BAPI, and get the date from the resulting table.
--------------
But when I try to configure the destination in my in the App.config file, like this:
<configSections>
<sectionGroup name="SAP.Middleware.Connector">
<sectionGroup name="ClientSettings">
<section name="DestinationConfiguration" type="SAP.Middleware.Connector.RfcDestinationConfiguration, sapnco"/>
</sectionGroup>
</sectionGroup>
</configSections>
<SAP.Middleware.Connector>
<ClientSettings>
<DestinationConfiguration>
<destinations>
<add NAME="mysrvr"
USER="sdf" PASSWD="sdf"
AHOST="sap-xpa-01" CLIENT="100" SYSNR="00"
MAX_POOL_SIZE="10" IDLE_TIMEOUT="10" LANG="EN"
/>
</destinations>
</DestinationConfiguration>
</ClientSettings>
</SAP.Middleware.Connector>
The instantiate the destination like this:
RfcDestinationManager.GetDestination("mysrvr"); //throws exception
This code throws an exception, saying that mysrvr can not be found.
I have have tried using the 'App.config' of a Unit Test project, as well as the 'app.config' of a Console Application. What am I doing wrong here?