on 02-03-2011 7:51 PM
I am prototyping with Visual Studio 2005 and have had wonderful results. The only problem that I am experiencing is the following error message AFTER the INITIAL request to my page right after my application has been built. Any subsequent requests to the page result in the following error:
"Destination configuration already initialized" from this line
RfcDestinationManager.RegisterDestinationConfiguration(new MyBackendConfig()) ;
Does anyone know a way to determine whether the destination has already been configured? Any help is greatly appreciated.
Edited by: Richard M. Mendez on Feb 3, 2011 8:52 PM
I've found that the following code works:
Config c = new Config();
RfcDestinationManager.RegisterDestinationConfiguration(c);
...
(processing code)
...
RfcDestinationManager.UnregisterDestinationConfiguration(c);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could try
public void RegisterDestination(string destinationName)
{
bool destinationIsInialised=((_rfcDestination !=null) && string.Equals(_rfcDestination.Name, destinationName));
// Only register if not already initialised
try
{
// ? destinantion already configured and initialised
if (!destinationIsInialised)
{
RfcDestinationManager.RegisterDestinationConfiguration(new SAPIDocDestinationConfiguration(new XmlDocument()));//1
_rfcDestination = RfcDestinationManager.GetDestination(destinationName);
}
}
// ignore as destination already configured
catch (RfcInvalidStateException rfcEx)
{
// cascade up callstack
throw rfcEx;
}
System.Diagnostics.Trace.WriteLine(
String.Format("Destination Confgured to:{0}", _rfcDestination.Monitor.OriginDestinationID));
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm facing the same problem. Any solutions so far?
Regards
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.