Skip to main content

Hi Team,

I am using ReflectionDT 16.0 and using below .NET code to interact with .rdx files. It's working if we trigger the EXE but its throwing the below error if the same code base is installed as "Windows service".

Could you please help me on this. This is a show stopper for us.

.NET Code
============
Application app1  = MyReflection.CreateApplication("myWorkspace", false);
log.Info("CreateApplication");
terminal = (IIbmTerminal) app1.CreateControl("C:\\\\User\\\\Test1.rd5x");
log.Info("CreateControl");
IFrame frame = (IFrame)app1.GetObject("Frame");
log.Info("GetObject");
frame.CreateView(terminal);
log.Info("CreateView");
IView views = frame.SelectedView;
IIbmTerminal ibm = (IIbmTerminal)views.Control;
screen = ibm.Screen;
Below Error is throwing while executing line "terminal = (IIbmTerminal) app1.CreateControl("C:\\\\User\\\\Test1.rd5x");":
===================================================================================

“Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.”


#Reflection
#Reflection16.0

Hi Team,

I am using ReflectionDT 16.0 and using below .NET code to interact with .rdx files. It's working if we trigger the EXE but its throwing the below error if the same code base is installed as "Windows service".

Could you please help me on this. This is a show stopper for us.

.NET Code
============
Application app1  = MyReflection.CreateApplication("myWorkspace", false);
log.Info("CreateApplication");
terminal = (IIbmTerminal) app1.CreateControl("C:\\\\User\\\\Test1.rd5x");
log.Info("CreateControl");
IFrame frame = (IFrame)app1.GetObject("Frame");
log.Info("GetObject");
frame.CreateView(terminal);
log.Info("CreateView");
IView views = frame.SelectedView;
IIbmTerminal ibm = (IIbmTerminal)views.Control;
screen = ibm.Screen;
Below Error is throwing while executing line "terminal = (IIbmTerminal) app1.CreateControl("C:\\\\User\\\\Test1.rd5x");":
===================================================================================

“Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.”


#Reflection
#Reflection16.0

Hi Mahendran Chinnaiah,

This error is not specific to Reflection Desktop.  I don't know all the details, but you are trying to run the application as a service and making a call to an object that requires user interaction.  You need to have Reflection Desktop running interactively in order for a call to a session file to work.  Also be mindful that this type of usage may not be compliant with the EULA for Reflection Desktop.  You can contact Micro Focus to get help on finding a solution that might better suite what you are trying to do.

Regards,

Jeff B


Hi Mahendran Chinnaiah,

This error is not specific to Reflection Desktop.  I don't know all the details, but you are trying to run the application as a service and making a call to an object that requires user interaction.  You need to have Reflection Desktop running interactively in order for a call to a session file to work.  Also be mindful that this type of usage may not be compliant with the EULA for Reflection Desktop.  You can contact Micro Focus to get help on finding a solution that might better suite what you are trying to do.

Regards,

Jeff B

Thanks Jeff. Yes we are trying to run this code as windows service in Production server(Windows server 2016). What type of code do we need to have "Refelction Desktop" interactively. IS there any other code can we call terminal without Application object.