on 02-16-2011 8:36 AM
Good day all,
At the moment I am developing an application that needs to assure that a connection with SAP is maintained. This will be done using a simple RFC call. Since I am not able to have an actual connection to SAP at the moment I am not surprised by receiving an RfcCommunicationException when running the code below:
RfcDestination _rfcDestination;
IRfcFunction _connectionTester;
_rfcDestination = RfcDestinationManager.GetDestination(tbName.Text);
try
{
_connectionTester = _rfcDestination.Repository.CreateFunction(tbConnectionTestMethod.Text);
}
catch (System.Exception exc)
{
_log.Error("Unable to create function.", exc);
throw;
}
I was surprised, however, that I received a System.ArgumentNullException on subsequent calls (without closing the application). If I restart the application I will first get the RfcCommunicationException followed by the System.ArgumentNullException.
Is this to be called normal behaviour or does this mean that once the connection is lost, the only way to get connected again is to restart the application?
Thank and regards,
Bjorn Wennemers
I'm having a very similar problem. I'm using the connection code supplied with the nco 3.0 connector. On the initial call to
RfcRepository repository = destination.Repository;
An RfcLogonException is raised as expected. However, on subsequent calls, the expection ArgumentNullException is raised instead. I would certainly expect the RfcLogonException exception to be raised each time if thhe application was not able to make a connection regardless of whether it's the 1st or 10th attempt. Obviously, this has something to do with having an active connection. I've tried reducing the connection pool to 0 and messing with the time out setting to no avail. This seems to be a bug in the connector.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same problem and can't figure out the reason.
Hope someone help us out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.