Please help me with this..
Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object.
at ZConRepWS.DataCopy.DataCopy.Start()
at ZConRep.App.WinService.ZConRepWS.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
for below code am getting this error..
namespace ZConRep.App.WinService
{
public partial class ZConRepWS : ServiceBase
{
private string serviceName = "ZConRepWS";
public ZConRepWS()
{
InitializeComponent();
CanStop = true;
CanPauseAndContinue = false;
CanHandleSessionChangeEvent = true;
AutoLog = true;
}
/// <summary>
/// *** OnStart
/// </summary>
/// <param name="args"></param>
protected override void OnStart(string[] args)
{
writeLog("Service " + serviceName + " starting... ");
// Start Timer
DataCopy.Start();
}