Saturday, January 18, 2014

Window Service in Studio 2010

1) Create New Project ("WindowsService")


2) Open Service1.cs  =>  press f4 key 
you will see property of service1.cs



3) Below  Property box you will see Add Installer Option => Click there
you will see ProjectInstaller.cs file in solution explorer


4) Now open ProjectInstaller.cs  
you will see two option there 
one is  serviceProcessInstaller1
second is serviceInstaller1


5) Right click on serviceInstaller1 and select property

in property box set StartType = Manual

6) Now build your solution 

7) Now , go to All programe => visual studio =>  visual studio tools => visual studio command prompt , Right click there Run As Administrator


8) go your Root path where your project located 

now type this line  C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\InstallUtil.exe or InstallUtil.exe
then type windowservice.exe 
give Enter

9) Now Press Win+R key and type services.msc

Find Service Name  windowservice.exe 
Right click on it and Start it.




No comments:

Post a Comment

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...