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...
![](https://i.stack.imgur.com/lkxJP.png)
-
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...
-
In Visual Studio 2012, if you create a ADO.NET Data Model then the generated Context class derives from a type called DbContext instead of...
-
Building your first Windows Metro style app using C#, C++, or Visual Basic [This documentation is preliminary and is subject to change.] ...
No comments:
Post a Comment