Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB .NET Windows Application as Windows Service

Status
Not open for further replies.

jgobrien

Programmer
Apr 15, 2005
27
0
0
US
I recently created a typical windows application project in VB .NET. It has a main form and a tray icon. I would like to give some end users the ability to install this application as a windows service.

The application's main purpose is to monitor XML messages and make changes to a SQL server database. The main form is an essential part of the application because it will be used to monitor events.

I did some research and found tons of information about creating a windows service project in VB .NET, but they don't seem to have the ability to use windows forms or any real user interface controls.

I was wondering if and how I could install this application as a windows service without using SRVANY. I tried adding a ServiceInstaller and ServiceProcessInstaller control to the main form and configured my installer as if this were a windows service project, but it did not work.

Any ideas?
 
When I said "Everything would be slow and unresponsive using a queue solution," I meant that my user interface might become slow and unresponsive if I was dumping requests into a database or message queue.

Which points out how important it is to get I/O and process intensive tasks out of the primary thread.

I say this because my service would be checking those queued requests on a timer, and also my event viewer would be refreshing on a timer. (at least that's how I pictured it)

Or you could use a tag file and a filesystemwatcher object.

However, SRVANY is working out very well for me. My service loads and connects before user logon and begins doing its job. When the user logs in, the tray icon becomes visible and the main user interface can be opened. I will be sure to post if I have any problems with it in the future.

A working solution is the goal :) I think this thread has moved into a broader area then trying to assist you, it's become quite a collection of design ideas for service based programs. I just don't want you to feel like we're cramming answers down your throught, just drumming up ideas for the next fiscal year ;)

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top