Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# VS10 and error "no suitable method to override" issue Pin
Deborah Palmer McCain15-Dec-11 5:27
Deborah Palmer McCain15-Dec-11 5:27 
AnswerRe: C# VS10 and error "no suitable method to override" issue Pin
BillWoodruff15-Dec-11 14:30
professionalBillWoodruff15-Dec-11 14:30 
GeneralRe: C# VS10 and error "no suitable method to override" issue - books for beginners Pin
Deborah Palmer McCain15-Dec-11 16:35
Deborah Palmer McCain15-Dec-11 16:35 
GeneralRe: C# VS10 and error "no suitable method to override" issue - books for beginners Pin
BillWoodruff15-Dec-11 18:40
professionalBillWoodruff15-Dec-11 18:40 
GeneralRe: C# VS10 and error "no suitable method to override" issue - books for beginners Pin
Deborah Palmer McCain15-Dec-11 20:37
Deborah Palmer McCain15-Dec-11 20:37 
QuestionShowDialog not displaying form. Pin
mnaveed14-Dec-11 6:23
mnaveed14-Dec-11 6:23 
AnswerRe: ShowDialog not displaying form. Pin
BillWoodruff14-Dec-11 22:03
professionalBillWoodruff14-Dec-11 22:03 
QuestionError 1067 C# windows service Pin
eyesark14-Dec-11 4:07
eyesark14-Dec-11 4:07 
I was doing a C# windows service. the service installs and runs well on my machine, but when i deploy on server (Windows server 2003), and try to start it, i get the dreaded 'Error 1067: application terminated unexpectedly'!
What to do?
some of the code is shown below:

i was doing a C# windows service. the service installs and runs well on my machine, but when i deploy on server (Windows server 2003), and try to start it, i get the dreaded 'Error 1067: application terminated unexpectedly'!
What to do?
some of the code is shown below:

C#
[RunInstaller(true)]
public partial class MessagingInstaller : Installer
{
    public MessagingInstaller()
    {
        InitializeComponent();
    }
}

public partial class MessagingService : ServiceBase
{
    //declare the message sending logic
    private MessagingLogic msglgc;
    //private readonly EventLog _log = new EventLog { Source = "MessageLogger" };

    public MessagingService()
    {
        InitializeComponent();
    }

    //create new instance of the message sending logic and/or start service
    protected override void OnStart(string[] args)
    {
        if (!EventLog.SourceExists("MessageLogger"))
            EventLog.CreateEventSource("MessageLogger", "Event Logger");

        var _log = new EventLog { Source = "MessageLogger" };

        try
        {
            if (msglgc == null)
                msglgc = new MessagingLogic();

            msglgc.Start();
        }
        catch (ArgumentException exception)
        { _log.WriteEntry("OnStart Error: " + exception.Message); }
    }

    //stop the service
    protected override void OnStop()
    {
        if (!EventLog.SourceExists("MessageLogger"))
            EventLog.CreateEventSource("MessageLogger", "Event Logger");

        var _log = new EventLog { Source = "MessageLogger" };

        try
        {
            if (msglgc != null)
                msglgc.Stop();
        }
        catch (ThreadAbortException exception)
        { _log.WriteEntry("OnStop Error: " + exception.Message); }
    }
}




Please help! I need the solution as soon as possible

modified 14-Dec-11 11:00am.

AnswerRe: Error 1067 C# windows service Pin
PIEBALDconsult14-Dec-11 4:34
mvePIEBALDconsult14-Dec-11 4:34 
AnswerRe: Error 1067 C# windows service Pin
Richard MacCutchan14-Dec-11 5:58
mveRichard MacCutchan14-Dec-11 5:58 
AnswerRe: Error 1067 C# windows service Pin
jschell14-Dec-11 9:18
jschell14-Dec-11 9:18 
AnswerRe: Error 1067 C# windows service Pin
Pete O'Hanlon14-Dec-11 11:22
mvePete O'Hanlon14-Dec-11 11:22 
QuestionRun the application once Pin
sarang_k14-Dec-11 3:07
sarang_k14-Dec-11 3:07 
AnswerRe: Run the application once PinPopular
Wayne Gaylard14-Dec-11 3:26
professionalWayne Gaylard14-Dec-11 3:26 
GeneralRe: Run the application once Pin
BobJanova14-Dec-11 3:43
BobJanova14-Dec-11 3:43 
GeneralRe: Run the application once Pin
Wayne Gaylard14-Dec-11 3:52
professionalWayne Gaylard14-Dec-11 3:52 
AnswerRe: Run the application once Pin
thatraja14-Dec-11 4:23
professionalthatraja14-Dec-11 4:23 
AnswerRe: Run the application once Pin
Luc Pattyn14-Dec-11 9:26
sitebuilderLuc Pattyn14-Dec-11 9:26 
GeneralRe: Run the application once Pin
BillWoodruff14-Dec-11 22:13
professionalBillWoodruff14-Dec-11 22:13 
GeneralRe: Run the application once Pin
Pete O'Hanlon14-Dec-11 22:15
mvePete O'Hanlon14-Dec-11 22:15 
AnswerRe: Run the application once Pin
BillWoodruff14-Dec-11 22:13
professionalBillWoodruff14-Dec-11 22:13 
QuestionUse the environment provided by the application instead from system environment. Pin
Member 848801414-Dec-11 1:35
Member 848801414-Dec-11 1:35 
AnswerRe: Use the environment provided by the application instead from system environment. Pin
PIEBALDconsult14-Dec-11 1:45
mvePIEBALDconsult14-Dec-11 1:45 
SuggestionRe: Use the environment provided by the application instead from system environment. Pin
Shameel14-Dec-11 2:02
professionalShameel14-Dec-11 2:02 
QuestionDisplay a menu in context menu Pin
sarang_k14-Dec-11 0:00
sarang_k14-Dec-11 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.