1

After many unsuccessful searches, I post a message to find a solution to my problem. I have a C# Windows service that has been running for many, many years without any problems. This service is an interactive service that displays an HMI. However, in recent months, I have more and more problems under Windows 10 and Windows Server 2016 that refuses to launch the service interactively.

When the service starts I get the following error message:

Displaying 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.

I checked the value of the variable "Environment.UserInteractive" directly in C#, it returns "false".

In addition, when I check the configuration of the Windows service the box "Allow the service to interact with the desktop" is checked.

I do not understand where the problem comes from and especially where can I search?

I am on a C # Framework .NET 4.6.1 application and under Visual Studio 2015.

Thank you in advance for your assistance !

1
  • Interactive services are obsolete. You have to have an app running in user context. If you also need a service then you need two processes. stackoverflow.com/q/4237225 Commented Jun 19, 2019 at 14:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.