New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
4 0 1 2

C# RFA (Dead Stop)

Hi Community:

Apologies if my question is too vague. I'm new to RFA and TREP.

I've created a simple application in C# to request snapshots (InitialImages) from TREP every few seconds. Nothing too voluminous. The application runs as a Windows Service and has been going well for about a week. Today, it just just stopped. It actually stopped on a function that closes down the RFA session. The code looks very similar to the standard quick start examples provided with RFA:

public void Stop()
{
try {
ommConsumer.UnregisterClient(loginHandle); ommConsumer.Destroy();
session.Release();
stgConfigDb.Destroy();
configDb.Release();
rdmFieldDictionary.Destroy();
if ((!Context.Uninitialize()) && (Context.InitializedCount == 0))
logger.Error("RFA Context fails to uninitialize.");
}
catch (System.Exception ex)
{
logger.Error(ex);
throw ex;
}

Nothing too fancy, and I do my best to catch any possible exception raised (which are logged).

My question is could the RFA component generate an exception dialog that would prevent my service from continuing to its next executable statement? I appreciate that Windows Services don't have a desktop, but I did notice during development (within Visual Studio's IDE) an occasional C++ dialog when I stopped the application abruptly. When I say dialog, I'm thinking of something similar the following (note: the error is just a V8 example I used to make it appear in VS):

I've configured my RFA config to log as much as possible (note: the application is using V7 RFA):

\Logger\ComponentLoggers\Connections\messageFile= "RFA7_Connections" \Logger\ComponentLoggers\RSSL_Adapter\messageFile= "RFA7_RSSL_Adapter" \Logger\ComponentLoggers\RSSL_Cons_Adapter\messageFile= "RFA7_RSSL_Cons_Adapter" \Logger\ComponentLoggers\RSSL_Prov_Adapter\messageFile= "RFA7_RSSL_Prov_Adapter" \Logger\ComponentLoggers\SessionCore\messageFile= "RFA7_SessionLayer" \Logger\ComponentLoggers\Static\messageFile= "RFA7_MsgFile"

Just wanted to check with the experts to see if I need to disable a setting in the RFA API to avoid a potential dialog popping up (even when running as a service).

Note: Found a log file at the time of the error and attached it below.

Many thanks (as always).

Regards,
Craig.

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
25.4k 90 13 26

Hi @frenchc

Please refer to the 'Message Box' section of the RFANET_ConfigGuide.pdf

The RFA_MESSAGEBOX_ENABLED is a Boolean config parameter which defaults to True and when set to True, a message box pops up for internal RFA errors.

Regards,

Umer

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you, Umer. Your answer worked perfectly.

Upvotes
4 0 1 2

Thank you for your reply, Umer. You are most kind. I'll certainly give the setting a try. I hope I didn't confuse the issue by including the screenshot above as the RFA_Verify dialog was just an example of a dialog taken from a Visual Studio. My error (as shown in the attached log) appears to be different and occurs when the executable is running as a native windows service.

Many thanks (again).

Regards,
Craig.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.