Tags: , , , | Categories: Windows Uygulaması Posted by okutbay on 03.03.2010 15:14 | Yorumlar (0)

You develop a windows service application and installed to your machine. When you try to start service you get this error.

image

Possible reason to this error is service name definitions.

Check the service name and service installer service name. Both must be the same. For instance this is from service class.

    1 private void InitializeComponent()

    2 {

    3     components = new System.ComponentModel.Container();

    4     this.ServiceName = "DataExporter";

    5 }

and this code is from service installer settings

    1 //

    2 // serviceInstallerDataExporter

    3 //

    4 this.serviceInstallerDataExporter.Description = "Exports Data for SPSS as CSV file";

    5 this.serviceInstallerDataExporter.DisplayName = "x Data Exporter";

    6 this.serviceInstallerDataExporter.ServiceName = "x Data Exporter";

    7 this.serviceInstallerDataExporter.StartType = System.ServiceProcess.ServiceStartMode.Automatic;

P.S.: If you have multiple service instances you must be more careful

Happy coding...

1 kişi tarafından 4.0 olarak değerlendirildi

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , , , | Categories: Programlama, Windows Uygulaması Posted by okutbay on 28.12.2007 02:50 | Yorumlar (0)
Windows Servis yazmanız gerekirse şu kaynaklar faydalı olacaktır. Bir ara inşallah bir yazı yazabilirim.
Kaynaklar:

Visual Studio Programmer`s Guide for the .NET Framework: Windows Service Applications
http://msdn.microsoft.com/en-us/library/y817hyb6(VS.80).aspx

Windows Services: New Base Classes in .NET Make Writing a Windows Service Easy
http://msdn.microsoft.com/msdnmag/issues/01/12/NETServ/

Writing a Useful Windows Service in .NET in Five Minutes
http://blogs.msdn.com/bclteam/archive/2005/03/15/396428.aspx

How Do I...Write a Simple Service Application?
http://samples.gotdotnet.com/QuickStart/howto/default.aspx?url=/quickstart/howto/doc/SimpleService.aspx

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5