N
NWx
Hi,
I try to write my first service, but I cannot test it
Service is a simple test one, just write a message in eventlog on start and
on exit
I tried to install it with installutil, it ask me to enter username /
password / verify password, and after I entered something, and I got the
following error message:
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The account name is invalid or does
not ex
ist, or the password is invalid for the account name specified
The service contains only two files
1. main service source module (with the code below)
Protected Overrides Sub OnStart(ByVal args() As String)
' read connection string for database access
InitServiceSettings()
InsurTimer.Start()
EventLog.WriteEntry("InsurService timer started")
End Sub
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
InsurTimer.Stop()
EventLog.WriteEntry("InsurService timer stopped")
End Sub
Private Sub InitServiceSettings()
Me.cConnectionString =
ConfigurationSettings.AppSettings(Me.CfgKeyConnString)
InsurTimer.Interval =
CLng(ConfigurationSettings.AppSettings(Me.CfgKeyTimerInterval))
Me.cSMTPMailServer = ConfigurationSettings.AppSettings(Me.CfgKeySMTPServer)
EventLog.WriteEntry("InsurService setup")
End Sub
And a file ProjectInstaller.vb, only with its default code
Can anyone tell me what should I do?
Thank you
I try to write my first service, but I cannot test it
Service is a simple test one, just write a message in eventlog on start and
on exit
I tried to install it with installutil, it ask me to enter username /
password / verify password, and after I entered something, and I got the
following error message:
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The account name is invalid or does
not ex
ist, or the password is invalid for the account name specified
The service contains only two files
1. main service source module (with the code below)
Protected Overrides Sub OnStart(ByVal args() As String)
' read connection string for database access
InitServiceSettings()
InsurTimer.Start()
EventLog.WriteEntry("InsurService timer started")
End Sub
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
InsurTimer.Stop()
EventLog.WriteEntry("InsurService timer stopped")
End Sub
Private Sub InitServiceSettings()
Me.cConnectionString =
ConfigurationSettings.AppSettings(Me.CfgKeyConnString)
InsurTimer.Interval =
CLng(ConfigurationSettings.AppSettings(Me.CfgKeyTimerInterval))
Me.cSMTPMailServer = ConfigurationSettings.AppSettings(Me.CfgKeySMTPServer)
EventLog.WriteEntry("InsurService setup")
End Sub
And a file ProjectInstaller.vb, only with its default code
Can anyone tell me what should I do?
Thank you