<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:osnews="http://osnews.com/rss2#">
	<channel>
		<title>OSNews: </title>
		<link>http://www.osnews.com/story/5568/A_Visual_Quickstart_Guide_to_Windows_NET_Services</link>
		<description>Exploring the Future of Computing</description>
		<language>en-us</language>
		<copyright>Copyright 2001-2009, David Adams</copyright>
		<webMaster>adam+nospam@osnews.com</webMaster>
		<lastBuildDate>Tue, 01 Dec 2009 10:41:22 GMT</lastBuildDate>
		<image>
			<url>http://www.osnews.com/images/osnews.gif</url>
			<title>OSNews.com</title>
			<link>http://www.osnews.com</link>
		</image>
		<item>
			<title>Interesting article</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I like that you were able to design the entire thing, as well as compile it, from within one program. It's quite an accomplishment that such an integral part of Windows can be designed so simply. I wonder if there is any equivalent for Linux. Doubtful.</description>
			<pubDate>Mon, 05 Jan 2004 19:49:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re :  Interesting article</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>If you knew anything about coding you should realize that the compiler and IDE are two separate programs ?  There are programs like that in Linux, emacs is one that comes to mind, along with many more.  <br />
<br />
Now who is trolling ?</description>
			<pubDate>Mon, 05 Jan 2004 19:51:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>There are programs like that in Linux, emacs is one that comes to mind, along with many more. <br />
ide + compiler setup under one program is what I was referring to.</description>
			<pubDate>Mon, 05 Jan 2004 19:53:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re : Interesting article</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt; I wonder if there is any equivalent for Linux. Doubtful.<br />
<br />
Please do not flamebait over here. This article about .NET on Windows, not about Linux. Do not start off topic flamebaits.<br />
<br />
&gt;Now who is trolling ?<br />
<br />
You are, Nego.</description>
			<pubDate>Mon, 05 Jan 2004 19:53:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>A question about .NET on Windows. </title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I have VS.NET 2003 but I don't seem to find the motivation to install it as it takes a long time (I need to install 2002 first and then upgrade it).<br />
<br />
I know that MS is offering a .NET SDK and C# compiler and tools free of charge, but I am not sure if it includes a debugger and if I can use these with SharpDevelop free IDE.</description>
			<pubDate>Mon, 05 Jan 2004 19:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Great Article / Resource</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I know how much resource it can take to figure out a (what seems as) simple task when it's not documented too well.  Thank you for your hardwork, I know i will find it useful !<br />
<br />
(Sorry Eugenia for earlier)</description>
			<pubDate>Mon, 05 Jan 2004 20:02:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: A question about .NET on Windows.</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>No, the SDK does not include a free debugger as far as I know.</description>
			<pubDate>Mon, 05 Jan 2004 20:08:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Free Debugger</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Yes, there is a free debugger in the SDK.  <br />
<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netstart/html/vcorithecom20sdkdebugger.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ne...</a></description>
			<pubDate>Mon, 05 Jan 2004 20:15:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Thanks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This is a good guide to help folks get off the ground when developing win32 .NET console-based services.<br />
<br />
I find it frightening how heavily dependent this process is on the visual studio .NET GUI - all just to make a console service?<br />
<br />
For Windows users curious how the same could be accomplished on Linux or BSD, one can use the 'cron' daemon to run a command every minute, hour, day, month, or day-of-the-week. <br />
<br />
For example, the following command will achieve the same result:<br />
<br />
 echo &quot;[`date '+%D %r'`]: I am ALIVE!&quot; &gt;&gt; ~/time_service.log<br />
<br />
It appends this line:<br />
<br />
 [01/05/04 12:10:11 PM]: I am ALIVE!<br />
<br />
to the 'time_service.log' file in your home directory. <br />
<br />
<br />
To make the 'cron' daemon run this command every minute, type 'crontab -e' and add the following: <br />
<br />
* * * * * echo &quot;[`date '+%D %r'`]: I am ALIVE!&quot; &gt;&gt; ~/time_service.log<br />
<br />
The 5 stars represent minute, hour, day, month, and day of the week.  In this case, we want to run our command every minute, all the time. <br />
<br />
Or, if your service is not interval based and instead is action/reaction based, you can run your executable/script in the background, like this:<br />
<br />
&gt; command &amp;<br />
<br />
The '&amp;' sends 'command' into the background.<br />
<br />
If you're an administrator, you can add your executable to a start up script in /etc, which is similarly easy - just add a single line to a text file.</description>
			<pubDate>Mon, 05 Jan 2004 20:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Thanks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Does this service you made run in kernel space?</description>
			<pubDate>Mon, 05 Jan 2004 20:39:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>FYI</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>There are a number of other sample on creating .Net based services on www.codeproject.com.<br />
<br />
To Anonymous, the service runs with the permissions level of the user under whose account the service is running (set during the install, or later via the component manager). Think of it running as a background user.<br />
<br />
To the author of the article, can you explain why the timer1 is being contained by the installer design, rather than the service class?</description>
			<pubDate>Mon, 05 Jan 2004 20:52:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Eugenia (IP: ---.osnews.com) </title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>If you have both 2002 and 2003 why deal with SharpDevelop??  I mean its a very nice FREE IDE but doesn't compare to vs.net.</description>
			<pubDate>Mon, 05 Jan 2004 21:08:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Please use the appropriate header when replying</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I know it doesn't compare. But I don't want to spend 2 hours installing VS.NET and spend 6 GB of space.<br />
<br />
In the meantime since my last message I have already installed the 1.1 SDK and #develop. It took about 500 MB and 20 minutes overall and it will be good enough for a beginning.</description>
			<pubDate>Mon, 05 Jan 2004 21:11:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Exactly why ...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>... to not get married.</description>
			<pubDate>Mon, 05 Jan 2004 21:16:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Upgrading VS.Net 2003</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>You should be able to install the VS.net 2003 upgrade first and feed it the 2002 disk to prove you have the previous version when the install routine asks for it.</description>
			<pubDate>Mon, 05 Jan 2004 21:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Debugging those services</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Took me a while to find when I was developing my first Windows Service...<br />
<br />
When you are ready to start debugging the .NET Windows Service it's nice to override the OnStart() method and add a sleep (10-15 seconds) there to give you time to attach the debugger before the service executes your code.<br />
<br />
Also, when you start the service go back into Visual Studio (I use 2002) and select Debug-&gt;Processes.  In the window find your service (by executable name) and click the Attach button.  Click Close and you will be debugging your service.  You can set breakpoints now that will be hit etc.   When you are done debugging go back into the Processes window detach from the process.  <br />
<br />
Hope that helps someone... :-)</description>
			<pubDate>Mon, 05 Jan 2004 21:32:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: RE: Thanks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description><i>Does this service you made run in kernel space?</i><br />
<br />
No, a cron job does not run in kernel space. In fact, almost nothing runs in kernel space on a typical unix machine. While there can be some (minor) performance gain from running code in kernel space, it is considered bad to put code into the kernel if it doesn't have to be there. Why? Because any bug in kernel code can easily lead to a crashed system or a security vulnerability. User space is good because it lets the OS do its job--protecting processes from one another.</description>
			<pubDate>Mon, 05 Jan 2004 22:04:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Thanks</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Just a few comments on the cron ideas (I'll just comment on them inline):<br />
<br />
I find it frightening how heavily dependent this process is on the visual studio .NET GUI - all just to make a console service?<br />
<br />
Well, you can write a .NET service as easy as writing the code in a .cs file and compiling it using csc.exe with the correct command-line parameters.  No GUI needed.<br />
<br />
For Windows users curious how the same could be accomplished on Linux or BSD, one can use the 'cron' daemon to run a command every minute, hour, day, month, or day-of-the-week.<br />
<br />
Windows provides a command 'at' which is similar to cron (granted not as powerful) which you can use to schedule tasks to run at various times using it.  Just run 'at /?' to see.<br />
<br />
Or, if your service is not interval based and instead is action/reaction based, you can run your executable/script in the background, like this:<br />
<br />
&gt; command &amp;<br />
<br />
The '&amp;' sends 'command' into the background.<br />
<br />
If you're an administrator, you can add your executable to a start up script in /etc, which is similarly easy - just add a single line to a text file.<br />
<br />
If you run a command using '&gt; command &amp;' does it continue to run if you log out?  A Windows Service can be set to run as soon as Windows boots even before any users logs in.  Also, with a Windows Service you can configure it to run as any user you'd like.<br />
<br />
I think you could loosely compare a Windows Service to a daemon in Unix.</description>
			<pubDate>Mon, 05 Jan 2004 22:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>re: Thanks by KRC</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Hi,<br />
<br />
The reason that it is so GUI oriented is because, I wanted to show how 'easily' it could be done using the GUI - there are a lot of code based tutorials around. Believe it or not, you would think that this type of information would be easily found, but it really isn't - least not that I could find.<br />
<br />
The do something part is simple on purpose, as well - rocket science is left to the user - I provided a shell not the meat.<br />
<br />
Your example using echo could be similarly managed in windows with the AT command and a batch file.<br />
<br />
Again, it's just a tutorial - it is educational not robust or useful.<br />
<br />
Thanks for the comments.<br />
<br />
Will</description>
			<pubDate>Mon, 05 Jan 2004 23:20:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Cool ... cool ....</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Worked as advertised, cept my executable ended up in binDebug .... is that normal?<br />
<br />
Good tutorial, BTW <img src="/images/emo/smile.gif" alt=";)" /></description>
			<pubDate>Tue, 06 Jan 2004 02:13:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Dammit ...</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>I meant ... my executable ended up in binDebug (after I clicked on Build Solution, there is no executable in the root directory of my project directory).</description>
			<pubDate>Tue, 06 Jan 2004 02:14:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>re:is that where it was supposed to go?</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>WorknMan:<br />
<br />
It should have been /bin/Debug if you built it in debug mode - the default and didn't specify a different directory. To specify the directory simply select Project-Properties from the main menu and select Configuration Properties in the dialog that pops up. Under Outputs you can change the Output Path (bin/Debug) to whatever you like - under the project directory.<br />
<br />
In order to actually install it in production (or just to test from another location) simply copy it where you want it to reside and run installutil nameofexe from that location. installutil comes with the .NET framework.<br />
<br />
Thanks,<br />
<br />
Will</description>
			<pubDate>Tue, 06 Jan 2004 02:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>re:Debugging those services</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Jeremy,<br />
<br />
Stellar hint! I didn't think of doing it that way, I just attached and then stopped the process - I know, pretty random, yours is a much better way and allows debugging of the startup code.<br />
<br />
Thanks,<br />
<br />
Will</description>
			<pubDate>Tue, 06 Jan 2004 02:52:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>You are awesome !!!</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This was a GREAT article and can only wish more were documentated and easy to read as this (the screen shots were excellent)!!!  It was not only useful but informative.<br />
<br />
Thanks much <br />
<br />
:)</description>
			<pubDate>Tue, 06 Jan 2004 05:01:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>How to budle this to install of another computer??</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This article assumes you are installing this on a the local machine - how do I deploy the created service on a third-party computer that does not have VS.NET on it???<br />
<br />
Thanks</description>
			<pubDate>Tue, 06 Jan 2004 05:08:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>How to budle this to install of another computer??</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This article assumes you are installing this on a the local machine - how do I deploy the created service on a third-party computer that does not have VS.NET on it??? <br />
<br />
Thanks</description>
			<pubDate>Tue, 06 Jan 2004 05:20:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: A question about .NET on Windows. </title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>SharpDevelop has a good debugger that comes from the .Net SDK.  SharpDevelop can be used on the .Net SDK because that is what it was designed for.  SharpDevelop didn't create their own compiler just an IDE.</description>
			<pubDate>Tue, 06 Jan 2004 12:45:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: How to budle this to install of another computer??</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>This article assumes you are installing this on a the local machine - how do I deploy the created service on a third-party computer that does not have VS.NET on it??? <br />
<br />
At the least you'll need the .NET Framework installed on any computer that you plan to run .NET applications on.  InstallUtil.exe comes with all versions of the .NET Framework, AFAIK, so you can always install a .NET Windows Service.</description>
			<pubDate>Tue, 06 Jan 2004 12:56:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: RE: How to budle this to install of another computer??</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>&gt;@Jeremy - At the least you'll need the .NET Framework installed on any computer that you plan to run .NET applications on. InstallUtil.exe comes with all versions of the .NET Framework, AFAIK, so you can always install a .NET Windows Service. <br />
<br />
But how do you se InstallUtil.exe ???</description>
			<pubDate>Tue, 06 Jan 2004 13:57:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title> RE: RE: How to budle this to install of another computer??</title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Anon:<br />
<br />
type pathtoinstallutilinstallutil nameofexe<br />
from the directory with nameofexe in it, where pathtoinstallutil is something like:<br />
D:WINNTMicrosoft.NETFrameworkv1.1.4322<br />
<br />
and nameofexe is something like:<br />
timedservice.exe<br />
<br />
as Jeremy pointed out, you get installutil with the framework.<br />
<br />
If you are looking for how to create a professional installer - I hate to be coy, but - that's beyond the scope of my little 15 page tutorial.<br />
<br />
Will</description>
			<pubDate>Tue, 06 Jan 2004 14:09:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Re: Eugenia (IP: ---.osnews.com) </title>
			<link>http://osnews.com/thread?</link>
			<guid isPermaLink="true">http://osnews.com/thread?</guid>
			<description>Yeah.....2 hours of doing something else.....once you start the install.....lwhy don't you go and do something else.....like see the outdoors or something for a few hours......once the install starts its not like you have to sit there.....also the 6GB....most of that is the MSDN and disk space is so cheap.....get over it.</description>
			<pubDate>Tue, 06 Jan 2004 15:25:00 GMT</pubDate>
			<author>donotreply@osnews.com (Anonymous)</author>
			<category>Comments</category>
		</item>
	</channel>
</rss>
