Interview questions

.Net - Implementing a Simple Windows Service

Next question>>           Learn .NET
.Net - Implementing a Simple Windows Service Application in .NET   - June 03, 2009 at 11:00 AM by Shuchi Gauri

Implementing a Simple Windows Service Application in .NET

Steps:
a. Create a window service project.
b. Service file appears with a constructor and OnStart and OnStop methods.
c. Override these methods as per the required functionality.
d. Add the installer to install the service and test it.

.Net - Implementing a Simple Windows Service Application in .NET  - April 30, 2009 at 15:00 PM by Amit Satpute

Implementing a Simple Windows Service Application in .NET

  • Select the Windows Service project.
  • The project template automatically adds a component class called Service1 that inherits from System.ServiceProcess.ServiceBase.
  • Click the designer to select Service1. Then, in the Properties window, set the ServiceName and the (Name) property for Service1 to My_New_Service.
  • Set the AutoLog property to true.
  • Create an instance of My_New_Service by editing the main menu.
  • Then add custom event log functionality to your service by dragging an EventLog component from the Components tab of the Toolbox to the designer.
  • Define what happens when the service starts by writing code for OnStart method.
  • Define what happens when the service stops by writing code for OnStop method.
  • Create the installers for your service
  • Create a setup project for your service
  • Add a custom action to the setup project
  • Install the Windows Service

Next question>>

Also read

What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

A service opens before one log in. However, a standard exe can be opened after a log in only................

.NET Windows Services

What are Windows Services?
Why are Windows Services needed?
Implementing a Simple Windows Service Application in .NET................. 



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring