Hi!
In .NET SDK is information, that a Windows Service written under .NET cannot run in the interactive mode.
But there is an option "Allow using desktop" under the service options, that enables this behaviour.
By checking this option, you can show forms and dialog boxes from your service.
My question is: Is it correct to check "Allow using desktop" option and showforms from .NET service?
Thanks.
-
-
A windows service which wants to display a user interface has to run under the SYSTEM account. This is a bad idea, because it's a very powerful account and most of the time it has more rights than you ever need, i.e. you would be violating the "Running with least privilege" principle. Furthermore, if such a service displays a window on a user's desktop it opens the possibility of the so-called "window message attack". I strongly recommend reading Keith Brown's "The .NET Developer's Guide to Windows Security". It contains some advice on how to display user interfaces from services, too.
Martin
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.