on 10-25-2004 9:48 AM
Hey there,
I wrote a little Server Program with the SAP .NET Connector. And it works fine, but what happens, if a Network Problem or something else occurs? Does I have opportunities to Hanlde such Problems with the Connection within my C# Program? The SAPServer Class has only an Event Disposed. What can I do, when my Server runs and for example the Network gets down?
And another thing I want to know, is the SAPServerStatus. I tried to Pause it and Continue. And this works also fine. But when I Output the ServerStatus, it shows also after continuing the Status: PausePending. Does I have to implement a little Wait routine, which waits until the Server is really Paused?
Thanks for all answers.
Regards,
O.Rill
I am having the same problem, i use
ActionOnServerException.Reconnect;
and it does nothing at all. It doesnt try to reconnect, nothing happens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does nobody has an answer to my question?
Please tell me, if the SAP .NET Connector has any functions for a SAP Server to Handle Connection Problems...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create your own ServerHost class (inheriting from the original one)and override the OnServerException method. The orignal version of this method will terminate the server ("return ActionOnServerException.Terminate"). Instead you can just continue ("return ActionOnServerException.Reconnect" or "return ActionOnServerException.AutoReconnect") or anything you think is appropriate. Note that every exceptions here will cause a entry in the trace and log files, so don't be irritated if they get very long over time...
This is, what I allready tried. But if I Start the Server with a wrong Host adress, the Method is not called. Here is my Code for the Method:
public class ServerHost : SAP.Connector.SAPServerHost
{
public SAP.Connector.ActionOnServerException onServerException(SAP.Connector.SAPServer server , System.Exception e)
{
Console.WriteLine("A Server Exception was thrown"+e);
return SAP.Connector.ActionOnServerException.AutoReconnect;
}
}
Is there no Chance to get an Changed Event on the Server Status?? This would be a good one for all Server Developers, I think.
The ActionOnServerException is not enough I think.... For Example the AutoReconnect is doing nothing. And the normal reconnect is also not very good, because it trys and trys. It would be much better to wait a little and then try again.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.