windows-services

WCF + SmtpClient: only works in a Windows 2008 environment

Hello all, Continuing the discussion started in another post: I used windows service to host a WCF mail sender. The service itself is quite simple: it uses a DataContract to get the basic System.Net.Mail.MailMessage class properties (supports attachment - please see the mentioned post, code by edosoft) and the System.Net.Mail.SmtpClient...

Correctly use <system.diagnostics> settings in application configuration file

I recently created a Windows service. One thing that it faithfully does is log any errors to the Application log. I have the following code that does this: Dim appLog = New System.Diagnostics.EventLog With {.Source = "MyService"} appLog.WriteEntry(message, EventLogEntryType.Error, transactionID) I also have the following in my app.con...

How do you add a windows service to an existing application installer?

Hi, We've created a windows service to detect the insertion of a particular usb device. That service is then supposed to launch an application we have written. We initially made a setup project for our application and a separate one for the windows service. Now, we are trying to get the service and the application installed in the sa...

How do you create a daemon like application to receive information from a windows service?

Hi, The goal is for my main application to either launch or be told when a usb device is inserted. To achieve this, I created a windows service and a shared remote object. I have a little windows forms application that runs in the background to launch the application. Its the little windows forms application I'm struggling with. How...

How to Create a C# Listener Service for MSMQ as a Windows Service

I'll start by saying I'm not a .NET developer, but have been thrown into a project where I need to use MSMQ so a classic ASP web application can send messages to a C# Windows Service that handles the processing. I have experience integrating other message queues with other languages, but like I mentioned, I don't have much experience wit...

Java Service Wrapper: socket not open, so packet not sent SERVICE_CONTROL_CODE : 4

We're using Java Service Wrapper and something weird is going on: I get the following lines repeated in the wrapper log file until someone manualy kills the process tree. DEBUG | wrapperp | 2010/10/13 11:57:10 | socket not open, so packet not sent SERVICE_CONTROL_CODE : 4 DEBUG | wrapper | 2010/10/13 11:57:10 | ServiceControlHand...

using external config file for a .NET windows service

Hi, I have an app.config file for a windows service which includes database connection strings and appsettings. when I install the windows service, it gets installed in "C:\program files\" folder and the settings are copied to a file called ".exe.config" in the same folder, which makes it difficult to change the settings after it is depl...

call javascript from windows service... possible??

This is a task I have and I am a little unsure about the way to go about achieving this. So I thought the best approach would be to ask other professionals for their thoughts. Basically, I will be storing a load of transactions/triggers for numerous affiliates in a database. Then using a widows service I am going to go through this data...

C# based Windows Service starts and then stops - why?

I have built a Windows Service and for some reason, when I start the service it starts up and then shuts right back down. I’ve tried googling why this is happening. Nothing is appearing in any system logs. Here is my Start/Stop code for the service. I would expect that since I have created a File Listener that it should stay running....

How can I make some external code run before a Windows service starts

This probably sounds crazy, but it's a real problem: I have an ISV-provided Windows service that I cannot change. There's a bug in the service where it doesn't "clean up" some data that it should upon startup. As a workaround, until the vendor can fix the bug, I would like to cause another process or script to always run just before thi...

SQLCLR trigger vs Windows service. When is it appropriate to use SQLCLR?

We have a .NET e-commerce application with a SQL Server 2005 back-end. A new order requires certain "post-processing". These tasks include sending emails, creating files, uploading files to an FTP server, and performing CRUD operations against a WCF data service. The code to perform all these tasks is already in place as several .NET cla...

When to use WCF Service and Plain old Windows Service?

We are developing an application that needs to be executing on a periodical basis (e.g. daily, or weekly depending on config). This application needs to consume existing WCF Services but this application itself does not expose any methods for others to consume. What would be the most suitable (and future-proof) technology to use for t...

C# ClickOnce deployment for Windows Services?

What are some best practices for being able to deploy a Windows service that will have to be updated? I have a Windows service that I will be deploying but might require some debugging and new versions during the beta process. What is the best way to handle that? Ideally, I'd like to find a ClickOnce-style deployment solution for Windo...

Windows Service to Check Email - IIS/C#

Updated: I need to figure out the best method for setting up an email account and automatically reading and processing emails. After some thought I want to check a POP account (Gmail) from my service. Are there any libraries/built in stuff I can use to do this? Free > Not Free. ...

Installing services from a multi-service /net assembly

Hi, I have a dot net windows service project which contains multiple services. This has now reached our deployment engineer who installs all his services using an automated script. The script uses SC.exe to create the services, he doesn’t use intallUtil. Unfortunately, from what I can see, SC.exe only ever creates a registry entry for th...

WIndow Services Event ID

I'm doing a C# project window service. 1st time doing it. I have managed to installed and checked that it is working. 1 thing that puzzle me is that when I see the event log, I notice all or almost all of the other services has its own Event ID. However in my project, I can't find the place to put this event id. Only saw a exit code, ...

C# based Windows Service - Tries to do JIT Debugging in production

I am getting this error in my event logs for a service I put into production: An unhandled win32 exception occurred in RivWorks.FeedHandler.exe [5496]. Just-In-Time debugging this exception failed with the following error: Debugger could not be started because no user is logged on. I have it installed and running under a ...

Check if a service exists on a particular machine without using exception handling

Don't know if there is a better way to do this, so that is the reason for the question. I can check if a service exists on a particular machine with the following code: bool DoesServiceExist(string serviceName, string machineName) { ServiceController controller = null; try { controller = new ServiceController(service...

filesystemwatcher as windows service?

hello, I am setting out to create an app that will watch a directory for any files created. pretty straightforward time to use a filesystemwatcher. My question relates to how to utilize it. Is it common practice to use a windows service to ensure the application is always running? i have been trying to get away from building windows ...

UNC Path not connected in the system services.

Hi, I have created the service in windows using the vb third party tool. In logon tab I had entered username and password. It worked fine for UNC path. But when I remove the user and Passwd, can't connect the UNC path. I want to connect the UNC path via service without giving user name and passwd. Please help on this. Thanks, Arun. ...