Windows Service: All about

Install/ Uninstall service

  • Open “Developer Command Prompt for VS2012”
  • [js]
    //Install
    installutil “C:\IFTUploadApp\App\IFTLabUpload.exe”

    //Uninstall
    installutil /u “C:\IFTUploadApp\App\IFTLabUpload.exe”
    [/js]

Debug Windows Service from Visual Studio

    1. Create your Windows service and install and start….
    2. That is, Windows services must be running in your system.
    3. While your service is running, go to the Debug menu, click on Attach Process (or process in old Visual Studio)
    4. Find your running service, and then make sure the Show process from all users and Show processes in all sessions is selected, if not then select it.
    5. Click the Attach button
    6. Click OK
    7. Click Close
    8. Set a break point to your desirable location and wait for execute. It will debug automatic whenever your code reaches to that point.
    9. Remember, put your breakpoint at reachable place, if it is onStart(), then stop and start the service again

Error message:

[html]
“The Windows Search service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs”
[/html]

    Try one of these solutions

  • Check DB config in “app.config” file
  • Change log on user from “Properties” window of the execution file

Be the first to comment

Leave a Reply

Your email address will not be published.


*