Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# serial port Pin
aniarun16-Dec-09 13:18
aniarun16-Dec-09 13:18 
QuestionTopic For Imagine Cup Pin
mwaqas199014-Dec-09 12:38
mwaqas199014-Dec-09 12:38 
AnswerRe: Topic For Imagine Cup Pin
Richard MacCutchan14-Dec-09 23:02
mveRichard MacCutchan14-Dec-09 23:02 
GeneralRe: Topic For Imagine Cup Pin
mwaqas199015-Dec-09 12:19
mwaqas199015-Dec-09 12:19 
QuestionData structure advice Pin
robertwaw14-Dec-09 10:45
robertwaw14-Dec-09 10:45 
AnswerRe: Data structure advice Pin
Dr.Walt Fair, PE14-Dec-09 11:43
professionalDr.Walt Fair, PE14-Dec-09 11:43 
AnswerRe: Data structure advice [modified] Pin
Luc Pattyn14-Dec-09 11:46
sitebuilderLuc Pattyn14-Dec-09 11:46 
QuestionService does not start [modified] Pin
Jordanwb14-Dec-09 10:45
Jordanwb14-Dec-09 10:45 
This is my code:

using System;
using System.IO;
using System.ServiceProcess;
using System.ComponentModel;
using System.Configuration;
using System.Configuration.Install;

namespace ServiceTest
{
	public class MainClass : ServiceBase
	{
		public static void Main(string[] args)
		{
            ServiceBase.Run(new MainClass());
		}

        protected override void OnStart(string[] args)
        {
			Console.WriteLine ("Started OK");
			
			base.OnStart (args);
		}
		
		protected override void OnStop ()
		{
			Console.WriteLine ("Stoppeds OK");
			
			base.OnStop ();
		}
	}
	
    [RunInstaller(true)]
    public class MainClassInstaller : Installer
    {
        public MainClassInstaller()
        {
            ServiceProcessInstaller process = new ServiceProcessInstaller();

            process.Account = ServiceAccount.LocalSystem;

            ServiceInstaller serviceAdmin = new ServiceInstaller();

            serviceAdmin.StartType = ServiceStartMode.Manual;
            serviceAdmin.ServiceName = "Service Test";
            serviceAdmin.DisplayName = "Service Test";

            Installers.Add(process);
            Installers.Add(serviceAdmin);
        }
    }
}


I'm writing a Server program in Monodevelop on Ubuntu 9.04, and I've got mono-service2 installed. When I try and run the exe via mono-service2 --debug ./ServiceTest.exe I don't get any output.

modified on Monday, December 14, 2009 4:51 PM

AnswerRe: Service does not start Pin
Migounette14-Dec-09 11:43
Migounette14-Dec-09 11:43 
GeneralRe: Service does not start Pin
Jordanwb14-Dec-09 12:12
Jordanwb14-Dec-09 12:12 
GeneralRe: Service does not start Pin
Migounette14-Dec-09 12:41
Migounette14-Dec-09 12:41 
GeneralRe: Service does not start Pin
Jimmanuel14-Dec-09 13:15
Jimmanuel14-Dec-09 13:15 
GeneralRe: Service does not start [modified] Pin
Jordanwb14-Dec-09 17:15
Jordanwb14-Dec-09 17:15 
GeneralRe: Service does not start Pin
Jimmanuel15-Dec-09 1:01
Jimmanuel15-Dec-09 1:01 
GeneralRe: Service does not start Pin
Jordanwb15-Dec-09 2:18
Jordanwb15-Dec-09 2:18 
GeneralRe: Service does not start Pin
Jimmanuel15-Dec-09 3:26
Jimmanuel15-Dec-09 3:26 
GeneralRe: Service does not start [modified] Pin
Jordanwb15-Dec-09 5:31
Jordanwb15-Dec-09 5:31 
GeneralRe: Service does not start Pin
Jimmanuel15-Dec-09 6:33
Jimmanuel15-Dec-09 6:33 
GeneralRe: Service does not start Pin
Jordanwb15-Dec-09 7:17
Jordanwb15-Dec-09 7:17 
QuestionPerhaps a threading problem? Pin
George Quarton14-Dec-09 10:12
George Quarton14-Dec-09 10:12 
AnswerRe: Perhaps a threading problem? Pin
Luc Pattyn14-Dec-09 11:56
sitebuilderLuc Pattyn14-Dec-09 11:56 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:17
George Quarton14-Dec-09 12:17 
GeneralRe: Perhaps a threading problem? Pin
Luc Pattyn14-Dec-09 12:41
sitebuilderLuc Pattyn14-Dec-09 12:41 
GeneralRe: Perhaps a threading problem? Pin
George Quarton14-Dec-09 12:45
George Quarton14-Dec-09 12:45 
GeneralRe: Perhaps a threading problem? [modified] Pin
Luc Pattyn14-Dec-09 13:00
sitebuilderLuc Pattyn14-Dec-09 13: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.