Hi all..need a little help from u all.
i have created a windows application using vb.net
wht i want to do is create a windows service for this application so that it can be started automatically or manually and started and stopped on demand. i have gone thr some forums and tried to create a windows service. i can see the service name in the services option in administrative tools, but when i start the service it gives an error as system.null reference..can any one help me out on how to create a windows service for the application...please reply asap...
thnks for ur help in adv..

Hi,

A Windows Services is a new name for a NT Services you used to develop in previous versions of Visual Studio. This Service writes some text to a text file when stop and start the service.

i can see the service name in the services option in administrative tools

Did you started the service?

Cheque in your temp directory if there is a text file with contents or not.

Otherwise, here's a tutorial how to create a windows service with VB.Net.

Hi,

A Windows Services is a new name for a NT Services you used to develop in previous versions of Visual Studio. This Service writes some text to a text file when stop and start the service.

Did you started the service?

Cheque in your temp directory if there is a text file with contents or not.

Otherwise, here's a tutorial how to create a windows service with VB.Net.

yes i tried to start the service but not able to start the application.
it used to give a debugging error,, if i double click the application exe it works fine but if i try to give the application exe and start it as a service i get the error...

Hi,

Did you used the installutil in order to install your service, there's no other way to do this if you dont have the .Net Framework runnig on your machine. The alturnatives if you are using normal CMD are :-

1. On VS 2003 : C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\InstallUtil.exe C:\MyService.exe

2 On VS 2005 Express : C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe C:\MyService.exe

Edited 6 Years Ago by Luc001: n/a

This article has been dead for over six months. Start a new discussion instead.