on 06-21-2023 8:55 AM
Hi, I am currently using SAP NCO 3.0 in one of our Web Services.
Whenever a call is initiate, the code will do RegisterDestinationConfiguration(cfg) and UnregisterDestinationConfiguration(cfg) after all bapi invoke process is completed. All web service call will be using the same cfg and destionation (RfcDestinationManager.GetDestination("SAP") where SAP is just a dummy since all webservices will use the same account).
By doing this, im getting error below when i try to unregister destination config
Error: SAP.Middleware.Connector.RfcInvalidStateException: Cannot unregister the given destination configuration
My guess: The config was unregisterd by other web services called.
Question: Is there a way to handle this unregister/register destination config better?
Hello Li,
> Whenever a call is initiate, the code will do RegisterDestinationConfiguration(cfg) and
> UnregisterDestinationConfiguration(cfg) after all bapi invoke process is completed.
Why do you do that? This is completely unnecessary. A destination configuration should only be registered once at the startup of your program (web application) and can remain active for as long as that web server runs! Then you don't have any problems with race conditions between parallel web sessions. That should solve that problem easily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.