windows-services

Exposing Windows Service through WCF

I have already created a windows service that monitors the network for some specific traffic. I now need to make a user interface for the service so traffic can be watched in real time, as well as the ability to alter the service's settings. Unfortunately, I'm stuck on how I take my working service, and expose it through/convert it to ...

Windows Service Installation

Scenario I have a server, that has NO Visual Studio Installed. It literally has a normal command prompt and nothing installed yet. We don't want to install anything (except the .Net framework which we have already done). We just want to install a bunch of C# Windows Services that we have written. So far I have been installing and runn...

Windows service threading call to WCF service

Hi, I have a windows service that is reading data from a database and then submitting it to a WCF serivce. Once that has finished it is stamping a processed date on the original record. Trouble I am currently having is to do with threading. The call to the WCF serivce is relatively long and I want to have a number of concurrent calls ...

How to communicate between service controller and a service/daemon?

It is easy to display the status of a Windows service or to control it (start/stop) from a GUI application but the question if how about receiving/sending notifications from the service? Like: service telling to the user monitoring it that it needs attention. Please consider that you can have several controllers started at any time in a...

CreateProcess from NT service hangs

I'm trying to start SQLServer2008SP1 express installer from the NT service process. Process is started successfully, I can see it in task manager, but it does nothing, just stays inactive until I kill him. I'm starting the process with the following command: szCmdLine = "Setup.exe /Q /HIDECONSOLE /ACTION=install /CONFIGURATIONFILE=Con...

Observing multiple windows services

I would like input on the design I currently have planned. Basically, I have some number of external instrumentation, each of which should always be running, collecting specific data. My thought was to create a service for each, always running and polling the instruments, performing logging, etc. There could be one instrument, or there ...

Windows Process Activation Service on Windows Server 2008 R2

Hi, Are there any limitations based on Windows Server 2008 R2 versions for Windows Process Activation Service? (i.e. some features of WAS are unavailable, limitations on number of worker processes, etc.) Thanks a lot! ...

what is the right way to exit Windoes Service OnStart if configuration is wrong and nothing to do in C#?

This is what I got: protected override void OnStart(string[] args) { if (SomeApp.Initialize()) { SomeApp.StartMonitorAndWork(); base.OnStart(args); } } protected override void OnStop() { SomeApp.TearDown(); base.OnStop(); } Here Initialize reads a config file and if it's wrong there's nothing to do...

.Net Windows Service to monitor mailbox

Hi there, I need to create a .Net windows service to monitor a mailbox and process attachments (if found) on the emails and then delete the email from the server. I have two questions I'd like your thoughts on: POP3 or IMAP to connect to the mail server? Which POP3/IMAP library should I use. At this stage we're just doing a proof of ...

Is there a way to bring an application's GUI to the current desktop?

Background: Started a fair amount of work before realizing that a Windows Service cannot start an app with a GUI that displays without potential problems. The proper solution of separating the GUI of the app to be started is non-trivial, so I'm trying to think of alternative solutions. There is a GUI to manage the service that is a se...

Name of current service in case the same exe was setup as multiple services

Is there a way to get the service name from C# that the current service was registered with when it was installed. For instance, I register the same service twice: sc.exe create ServiceName1 binPath= D:\myservice.exe sc.exe create ServiceName2 binPath= D:\myservice.exe In my service, I actually want to know if I am ServiceName1 or Se...

WCF Host as windows service faults

I have this WCF service running as a window service. I have in my code that everytime it faults it will restart the service. Now I'm having the issue where the host faults, it tries to restarts, then faults again, but at some point it just stop the service. Wondering why it stop the service? Is this something handled by the OS that...

Calling a method on windows service while executing

Hi ! I'd like to know if it's possible to call a method on a WCF windows service while another one is executing ? I need this so I can call my Terminate method that sets a static variable shared by my threads that tells them to stop. But when I call the method on the service, it waits till the first one (Execute) is over before he takes...

Undead Windows 7 service

I created a Windows 7 service in Visual Studio 2010. Test install crashed and left lots of debris: service shows in the list of services but will not start ('Referenced file does not exist'), is impossible to uninstall ('Action valid only for services that are installed') and is not shown in the Programs and Features aplet. Is there a ...

Can I use WCF to replace my current Web Service and Window Service combination?

I need a little bit of advise regarding the situation I am faced with. The current arrangement I have been tasked with improving just doesn't sit well with me and I feel like there is a better way to do it. The more I read about WCF, the more I get the feeling that it might be what I am looking for. Right now, I have an asp.net client...

What development tools support creation of Windows Services?

Aside from ActiveState's PerlSvc, what other interpreters and compilers support the development of Windows Services? ...

Windows NT Service shutdown issues

I have developed middleware that provides RPC functionality to multiple client applications on multiple platforms within our organization. The middleware is written in C# and runs as a Windows NT Service. It handles things like file access to network shares, database access, etc. The middleware is hosted on two high end systems runnin...

Hosting a WCF Service Lib through a Windows service get a System.InvalidOperationException: attempting to start WCF Service

I have a WCF Service Library containing five service contracts. The library is hosted through a Windows Service. Most if not all my configuration for the WCF Library is declaritive. The only thing I am doing in code for configuration is to pass the type of the class implementing the service contracts into ServiceHost. I then call Open on...

Send Automated Email through Windows Service that has an embedded image using C#

I already have a C# windows service that we use internally to monitor a directory on our network and when it detects a change sends off an email using our internal SMTP server to the specified groups of people. Now I need to embedd an image in that automated email. I understand that I need to create an AlternateView and a Linked Resour...

C# Windows Service doesn't seem to like privatePath

I wrote a C# Windows Service to handle task scheduling for our application. I'm trying to move the "business rules" assemblies into a bin subdirectory of the scheduling application to make it easier for us to do updates (stop service, delete all files in bin folder, replace with new ones, start service). I added <runtime> <assemblyB...