Click here to Skip to main content
15,891,567 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Is it possible that userConfrol was called before mainpage? Pin
Yusuf27-Jan-11 0:57
Yusuf27-Jan-11 0:57 
Questionhttpcontext Pin
Ramkumar_S25-Jan-11 15:06
Ramkumar_S25-Jan-11 15:06 
AnswerRe: httpcontext Pin
Not Active25-Jan-11 15:20
mentorNot Active25-Jan-11 15:20 
AnswerRe: httpcontext Pin
Parwej Ahamad25-Jan-11 20:24
professionalParwej Ahamad25-Jan-11 20:24 
GeneralRe: httpcontext Pin
Not Active26-Jan-11 2:21
mentorNot Active26-Jan-11 2:21 
QuestionWindows Service stopping automatically Pin
indian14325-Jan-11 5:01
indian14325-Jan-11 5:01 
AnswerRe: Windows Service stopping automatically Pin
Not Active25-Jan-11 5:32
mentorNot Active25-Jan-11 5:32 
GeneralRe: Windows Service stopping automatically Pin
indian14325-Jan-11 6:01
indian14325-Jan-11 6:01 
Hi,

Here is the code that I have written, can you please look at it and tell me where I am calling stop method when I am calling the start method. I am not doing it. Even if I remove the Console.WriteLine and Console.ReadLine also there is nothing differnce. Its giving the same message and stopping it. any sort of help is appreciated. This is the code in my service. If you need code from the IninitalizeComponent or from the ProjectInstaller I can give it here. Can you please help me in this I am new to the windows services.

public partial class MyNewService : ServiceBase
{
    public MyNewService()
    {
        //InitializeComponent();

        InitializeComponent();
        if(!System.Diagnostics.EventLog.SourceExists("DoDyLogSourse"))
            System.Diagnostics.EventLog.CreateEventSource("DoDyLogSourse","DoDyLog");

        eventLog1.Source = "DoDyLogSourse";
        // the event log source by which

        //the application is registered on the computer
        eventLog1.Log = "DoDyLog";
    }

    protected override void OnStart(string[] args)
    {
        eventLog1.WriteEntry("my service started");
        System.Console.WriteLine("my service started");
        System.Console.ReadKey();
    }

    protected override void OnStop()
    {
        eventLog1.WriteEntry("my service stoped");
        System.Console.WriteLine("my service stoped");
        System.Console.ReadKey();
    }

    protected override void OnContinue()
    {
        eventLog1.WriteEntry("my service is continuing in working");
        System.Console.WriteLine("my service is continuing in working");
        System.Console.ReadKey();
    }

    protected override void OnPause()
    {
        eventLog1.WriteEntry("my service is Paused");
        System.Console.WriteLine("my service is Paused");
        System.Console.ReadKey();
    }

    protected override void OnShutdown()
    {
        eventLog1.WriteEntry("my service is Paused");
        System.Console.WriteLine("my service is Paused");
        System.Console.ReadKey();
    }
}

Thanks & Regards,

Mohammad Abdul Aleem
St Louis, USA

GeneralRe: Windows Service stopping automatically Pin
TheGreatAndPowerfulOz25-Jan-11 7:02
TheGreatAndPowerfulOz25-Jan-11 7:02 
GeneralRe: Windows Service stopping automatically Pin
indian14325-Jan-11 7:11
indian14325-Jan-11 7:11 
GeneralRe: Windows Service stopping automatically Pin
TheGreatAndPowerfulOz25-Jan-11 9:38
TheGreatAndPowerfulOz25-Jan-11 9:38 
GeneralRe: Windows Service stopping automatically Pin
indian14325-Jan-11 10:44
indian14325-Jan-11 10:44 
GeneralRe: Windows Service stopping automatically Pin
Pete O'Hanlon25-Jan-11 11:08
mvePete O'Hanlon25-Jan-11 11:08 
GeneralRe: Windows Service stopping automatically Pin
indian14325-Jan-11 13:43
indian14325-Jan-11 13:43 
GeneralRe: Windows Service stopping automatically Pin
Not Active25-Jan-11 15:14
mentorNot Active25-Jan-11 15:14 
GeneralRe: Windows Service stopping automatically Pin
indian14326-Jan-11 6:28
indian14326-Jan-11 6:28 
GeneralRe: Windows Service stopping automatically Pin
TheGreatAndPowerfulOz26-Jan-11 6:50
TheGreatAndPowerfulOz26-Jan-11 6:50 
GeneralRe: Windows Service stopping automatically Pin
indian14327-Jan-11 4:58
indian14327-Jan-11 4:58 
Questiontextbox enter key disallow button click Pin
C#Coudou23-Jan-11 13:57
C#Coudou23-Jan-11 13:57 
AnswerRe: textbox enter key disallow button click Pin
Not Active23-Jan-11 14:40
mentorNot Active23-Jan-11 14:40 
GeneralRe: textbox enter key disallow button click [modified] Pin
C#Coudou23-Jan-11 15:18
C#Coudou23-Jan-11 15:18 
GeneralRe: textbox enter key disallow button click Pin
fjdiewornncalwe23-Jan-11 17:14
professionalfjdiewornncalwe23-Jan-11 17:14 
QuestionSend thousands thousands of emails with SMTP ? Pin
devboycpp23-Jan-11 8:23
devboycpp23-Jan-11 8:23 
AnswerRe: Send thousands thousands of emails with SMTP ? PinPopular
fjdiewornncalwe23-Jan-11 10:21
professionalfjdiewornncalwe23-Jan-11 10:21 
AnswerRe: Send thousands thousands of emails with SMTP ? Pin
Not Active23-Jan-11 10:27
mentorNot Active23-Jan-11 10:27 

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.