Click here to Skip to main content
15,894,539 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:49
_Q12_20-May-11 7:49 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Alan N20-May-11 7:45
Alan N20-May-11 7:45 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 8:06
_Q12_20-May-11 8:06 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Ghydo20-May-11 8:44
Ghydo20-May-11 8:44 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 8:50
_Q12_20-May-11 8:50 
QuestionRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 9:11
sitebuilderLuc Pattyn20-May-11 9:11 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 9:20
_Q12_20-May-11 9:20 
QuestionWindows Service host for WCF service will not stay running ("starts | Says there is nothing to do | Stops") [modified] Pin
Alaric_20-May-11 5:26
professionalAlaric_20-May-11 5:26 
I'm trying to get a WCF service up and running inside a Windows Service. The WCF service is supposed to troll for messages (xml) in a queue, adapt the xml message body to one of our business objects, and toss the object down the architecture as if it were just any other <insert>.

I worked through the installation earlier this morning (wasn't running command line as Administrator...remember to do that lol) but now, when I attempt to start my service, it pops up and gives the familiar
<Foo> service on <machine> started and then stopped. Some services stop automagically if they are not in use by other services or programs.


I don't think I'm doing anything fancy, at all. I'm just trying to get the thing to fire up and possibly see a message dropped on the queue get picked up by our WCF service, adapted, and inserted into our database.

I'm not really all that experienced with WCF services though...and come to think of it, I don't think I've actually created a Windows Service since college...and it seems as if Google does not know this answer or I'm phrasing my searches incorrectly.

Here's my Windows Service code.

public partial class LoggingWinService : ServiceBase
    {
        public ServiceHost host = null;
        public LoggingWinService()
        {
            ServiceName = "LoggingServiceSample";
            InitializeComponent();
        }
        public static void Main()
        {
            ServiceBase.Run(new LoggingWinService());
        }
        protected override void OnStart(string[] args)
        {
            if (host != null)
            {
                host.Close();
            }
            host = new ServiceHost(typeof(LoggingWCFService));
            host.Open();
        }

        protected override void OnStop()
        {
            if (host != null)
            {
                host.Close();
                host = null;
            }
        }
    }


...help?
"I need build Skynet. Plz send code"

modified on Friday, May 20, 2011 12:07 PM

AnswerRe: Windows Service host for WCF service will not stay running ("starts | Says there is nothing to do | Stops") Pin
Alaric_20-May-11 6:27
professionalAlaric_20-May-11 6:27 
QuestionChange compression type Pin
Rico_19-May-11 23:04
Rico_19-May-11 23:04 
AnswerRe: Change compression type Pin
Dave Kreskowiak20-May-11 2:52
mveDave Kreskowiak20-May-11 2:52 
QuestionHow can i create one button for two events in C# 2008 vs? Pin
FeniksReborn19-May-11 22:13
FeniksReborn19-May-11 22:13 
AnswerRe: How can i create one button for two events in C# 2008 vs? Pin
Wayne Gaylard19-May-11 22:34
professionalWayne Gaylard19-May-11 22:34 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
FeniksReborn19-May-11 23:43
FeniksReborn19-May-11 23:43 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Wayne Gaylard20-May-11 0:04
professionalWayne Gaylard20-May-11 0:04 
AnswerRe: How can i create one button for two events in C# 2008 vs? PinPopular
Shameel20-May-11 0:05
professionalShameel20-May-11 0:05 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Subin Mavunkal20-May-11 0:59
Subin Mavunkal20-May-11 0:59 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Tony Richards20-May-11 1:35
Tony Richards20-May-11 1:35 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Shameel20-May-11 1:41
professionalShameel20-May-11 1:41 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
BobJanova20-May-11 3:21
BobJanova20-May-11 3:21 
AnswerRe: How can i create one button for two events in C# 2008 vs? Pin
PIEBALDconsult20-May-11 2:31
mvePIEBALDconsult20-May-11 2:31 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Wayne Gaylard20-May-11 2:52
professionalWayne Gaylard20-May-11 2:52 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
J4amieC20-May-11 3:16
J4amieC20-May-11 3:16 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
BobJanova20-May-11 3:24
BobJanova20-May-11 3:24 
GeneralRe: How can i create one button for two events in C# 2008 vs? Pin
Eddy Vluggen20-May-11 4:12
professionalEddy Vluggen20-May-11 4:12 

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.