[dba-VB] A windows Service or Not a service?

Francisco Tapia fhtapia at gmail.com
Thu Jun 16 10:58:04 CDT 2011


I wrote a simple application that has a form and two buttons (along with a
timer).  My initial idea was that I would write this to be a windows service
so it would auto-start whenever a specific server would reboot etc.  The
purpose is that I need to get new records created by a "Vendor" application
and have them sent to a Second "Vendor" system.  I call a custom view that I
wrote that collects that last set of changes, then record by record calls a
webservice on our SAP system and pushes in the new changes.  My sql server
version is Sql Server 2000 so it's not as easy as just writing a soap object
to make the webservice call, I think it was much easier to just write the
app in c# and make the call that way, which works.  NOW for the tricky
part.  I wanted to write up the app to create a windows service installer so
that my admins could log into the windows server and either start or stop
the application, I also wanted to provide a gui view to the windows service
so that they could choose a different timer so it could run every 1 minute
(every 2 minutes, etc..) what ever they would choose.

after reading MS's description on windows service classes, I noticed that
supposedly the .Net Studio does not support this, but I've seen other apps
that DO provide a gui view to the windows service that they introduce.  so
my question to the group is, have you done this before? and if so how did
you go about it?

--
http://msdn.microsoft.com/en-us/library/d56de412%28v=VS.90%29.aspx

The Windows service classes supported by the .NET Framework do not support
interaction with interactive stations, that is, the logged-on user. The .NET
Framework also does not include classes that represent stations and
desktops. If your Windows service must interact with other stations, you
will need to access the unmanaged Windows API. For more information, see Window
Stations<http://msdn.microsoft.com/en-us/library/ms687096%28v=VS.90%29.aspx>and
Desktops<http://msdn.microsoft.com/en-us/library/ms682573%28v=VS.90%29.aspx>in
the Platform SDK documentation.


-Francisco
http://bit.ly/sqlthis   | Tsql and More...
http://db.tt/JeXURAx | Drop Box, Storage in the Cloud (free)



More information about the dba-VB mailing list