I tried to call init with username,server id in windows service program .Service is not running after we implemented this .
When i tried calling init without username .I mean step 3 example .It is working fine .Service is running .
It got stuck when we tried calling with user name ,password .
// perform application initialisation
res = myApp.init( username, /* username */
appId, /* application Id */
pos /* position */
In Event viewer we got time out error
As mentioned above and in the documentation it defaults to True. So, you would need to explicitly set to False by adding the config parameter into your config or registry.
I would also advise using flat file for config rather than registry (if you are currently using registry) - in case there are permission issues for the service to access the registry - which is another issue I have encountered previously in relation RFA Windows service deployment.
You can also set the log file to a suitable location and then see if anything is logged when you try to run as a service. If so, share the log file here.
Also, if your service is not running with Admin privileges then you should also disable windowsLoggerEnabled (Default is set to True, the AppLogger will attempt to log events into the Windows Event Log which requires Admin rights). Please refer to the above config guide link for more details. You should also be able to find the config guide in the docs folder of your RFA sdk package.
Our application windows service based one .We are able to use your api .We are able to do basic initialization successfully .
We did next step by added MyClient.cpp
When I added this file MyClient.cpp (MyClient : public rfa::common::Client this file is responsible for handling all events) in to our source code .Service is not running.
When I removed this file .Service is running .Is there any registry settings required to use this file
Basically we need to test with login credentials to get the price data .
I recommend you test as a standalone application to ensure your login, connection etc works before attempting windows Service deployment.
One common issue I have seen with people using RFA app as a service, if the following is not set to False in the RFA config and an error dialog pops up...
RFA_MESSAGEBOX_ENABLED Default value = True. When set to true a message box pops up for internal RFA errors.
You may also need to check if RFA_LOG_FILENAME points to a location that the service can write to.
Please see RFA Config guide for further details.
Apart from the suggestion by Umer to set windowsLoggerEnabled to false.
As far as I know, the running directory of windows service is not the same as when you run the standalone app.
Do you have any try-catch block around the codes that call Session::acquire? it may throw some exception so it looks like freeze when you run it. You can print or log the exception details to see the error.
In some case, there is a problem from RFA unable to find logger message file due to the location of the running directory and we usually suggest client add
in RFA configuration to avoid the exception from the logger message.
Can you add the useInternalLogStrings=true in RFA config?