Closed tom-j-irvine closed 5 months ago
Are you using this implementation https://github.com/huysentruitw/SapNwRfc/pull/53/commits/7fa7175ea4e6c3b7bd9246b1d1d90faaa6090db5 ?
No, that doesn't look exactly like what I have. I can try adding those changes see if it changes things.
I added that later in https://github.com/huysentruitw/SapNwRfc/pull/53
That is what I needed. Error event is working now and will be very helpful. Thanks!
I have been successfully using the
SapServer
functionality for quite a while, but haven't been able to handle errors in the connection. I'm handling theStateChange
event which works as expected when the server is explicitly started, stopped, etc. However, if something breaks the connection on the SAP side (including forcing the disconnection in SMGW), theStateChange
event doesn't fire. It does appear this is correct, but any attempt to handle theError
event immediately aborts my application.I can add the
Error
handler at startup without issue. However, as soon as it fires, my application crashes and I'm unable to trap the exception. The exception looks something like this:In the debugger, the offending thread shows
Thread - [Managed to Native Transition]
So, it would seem this issue is off in un-managed code that I can't handle myself. I looked pretty closely at the RFC SDK documentation vs. the
RfcInterop
and I don't see any discrepancies.These are the steps I can use to cause the issue:
Goto
->Logged on Clients
Goto
->Logged on Clients
->Delete Client
Any input or help on how this event can be handled would be greatly appreciated.