Wednesday, March 14, 2012
Steps to create window service in Visual Studio
(1) Open Visual Studio
(2) Create a window service with any name
(3) Now write your logic there
(4) Build. If successfully build
(5) Now on service file (service1.cs designer), right click and select "Add Installer" It will add "serviceProcessInstaller1" and "serviceInstaller1"
(6) Add description/name/service name
(7) Now select the properties of "serviceProcessInstaller1" and set Account=LocalSystem. If you will not select this then it will ask local system username and password every time.
(8) Mention StartType as 'Automatic'. If select 'Manual' it needs to start manually.
(9) Build this service. If its successfully build. the go on next step.
(10) Go to Visual Studio command prompt. Write there
C:\Program Files\Microsoft Visual Studio 8\VC>installutil -i "C:\Inetpub\wwwroot\ServiceName\bin\Debug\Service.exe"
If you want to uninstall window service the just write the -u instead of -i.
C:\Program Files\Microsoft Visual Studio 8\VC>installutil -u "C:\Inetpub\wwwroot\ServiceName\bin\Debug\Service.exe"
If starttype is manual, then it needs to run manually. Every time it install. It need to start manually from servies. To Start it . Go to Run > Services.msc. Right click on service and click Start.
Subscribe to:
Post Comments (Atom)
Could not find a part of the path ... bin\roslyn\csc.exe
I am trying to run an ASP.NET MVC (model-view-controller) project retrieved from TFS (Team Foundation Server) source control. I have added a...
-
Building Custom Controls for Windows 8 Store apps : This article explains how to build custom controls for Windows Store apps, using XAML a...
-
Adding the New HTML Editor Extender to a Web Forms Application using NuGet : The July 2011 release of the Ajax Control Toolkit includes a ne...
-
September 2011 Release of the Ajax Control Toolkit : I’m happy to announce the release of the September 2011 Ajax Control Toolkit. This rele...
No comments:
Post a Comment