Windows Service

  • Thread starter Thread starter Stanley
  • Start date Start date
S

Stanley

Hi everyone! I can create Windows Service in VB .Net 2003 professional.
The problem is that when I try to show up a form in Service Start up
event, the form always show up and become stop responsible! Any idea?

Regards,
Stanley
 
Do not show forms from a service. Services should never interact with the
desktop.
 
Thanks for reply! You mean that it's not impossible to make a windows
service interact with desktop?? I don't think so! Please help to with
the code, I think it's possible!!

Thanks again!
 
Stanley said:
Thanks for reply! You mean that it's not impossible to make a windows
service interact with desktop?? I don't think so! Please help to with
the code, I think it's possible!!

It's possible, but it's bad design. Services can interact with the
desktop, but to do so, they have to run with the LocalSystem-Account.
This one can do everything with your system. The service window will
be shown at the users desktop and so, it can receive window messages
as any other desktop window. This can be used to attack the users PC.
Also, if your service runs under WinXP with fast user switching, the
service window will only be shown to the first logged on user.

The better approach is a separate client application, which runs with
user privileges and connects to your service through TCP-Sockets for
example.

Thorsten Dörfler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top