.Net, ASP.Net, C#, VB.net, SQL Server, Xml, CSS, Design Patterns related tips, tricks, code snippets, articles, links, thoughts, etc. from Binu & Subi Thayamkery.

Binu Thayamkery is a seasoned software architect with more than 13 years of experience in developing enterprise grade connected systems using Microsoft Technologies. In his current position as a lead consultant-solution architect with Prudential Financial, he is working on architecture of next generation investment reporting framework using .net 3.5/WCF/AJAX, etc. He holds a Masters Degree in Computer Science from Colorado State University. Subi Thayamkery is an experienced software developer with more than 8 years of developing various application software systems ranging from workflow automation systems to compliance management tools. She currently works as a technology consultant for Prudential Financial where she helps develop a new system for corportate governance department. She holds an Electrical Engineering degree from New Jersey Institute of Technology.

Friday, January 05, 2007

Windows Service and .Net

Before .net , writing a windows service (NT Service) used to be a messy C++ job. .Net made writing a
windows service simple and straight forward.

What process is a good candidate to be written as a Windows service?

A long running process or a repeating process that requires no user interaction, no
user interface, not even a console - just sit and do some work kind of process - you write it as a
windows service. Just make sure that you document your service well and publish, so that every one
knows the existence of it. Because for the server ops people, when they take inventory of stuff running
in a server, a custom windows service is not the first one makes the list. This might result in your
service not started after a server re-start and so on.

So it is a good practice to setup your service to start automatically, also if your service does not
require any special permissiona run it under local account. If it requires special permissions like
accessing a file share, create a service account with least required access and run service under that
account...

Next post I will discuss writing a simple service...

Cheers!

0 comments: