windows-services

[SC] DeleteService FAILED 1072

Last time I create WAS profile and WASService then I try to config and run many script for learn how to config WAS, Finally it crash so i use wasprofile delete this profile and forgot delete WASService. Now I found IBM Webphere Application Server service display in services.msc list, so I tried to delete it with WASService.exe -remove c...

windows service versus asp.net Application_BeginRequest event with threads/timers

Hi, What are the advantages/disadvantages to running time based jobs using: windows services Application_BeginRequest to start seperate threads / timers. One disadvantage of running the jobs in the context of a asp.net web appplication is during .net recycling things will have to be setup again, any others? ...

Windows Services and Environment Variables

I am attempting to write a windows service in C#. I need to find the path to a certain file, which is stored in an environment variable. In a regular C# console application, I can achieve that with the following line: string t = System.Environment.GetEnvironmentVariable("TIP_HOME"); If I write that to the console I see that it was su...

How do I encrypt app.config file sections during install with WiX?

I have found an example for encrypting a web.config during installation here, but my app is a windows service. The aspnetreg_iis method works only for web.config files. I know how to programatically encrypt the config file, but I don't think I can do that using WiX. Am I wrong? Any ideas? ...

System.BadImageFormatException "invalid format" when trying to install service with installutil.exe

I am trying to install a Windows service using InstallUtil.exe and am getting the error message System.BadImageFormatException - invalid format What gives? ...

Self Hosting TCP based WCF service inside a Windows Service

I am trying to Self host a wcf tcp based service inside a windows service. The windows service is a wrapper which does mainly two jobs, 1> hosting a tcp based wcf service, note that the windows service is a simple service 2> running other windows services under it I am able to run the windows service but when trying to connect to it usi...

Upgrade a Windows Service without Uninstalling

Currently I have to uninstall the old version of my service before I install the new version. I am pretty sure this has something to do with it not being smart enough to update or remove the old service entries before adding the new ones. Is there a way to have the installer skip registering the service if it already exists? (I can assu...

Creating a Windows service with user notification in C#?

I want to create Windows service in such a way : -> It takes input database information ... -> at completion of service it notifies user for completion of process. How can I do this with Windows service in C#.Net? Thanks ...

How to uninstall a Windows Service when there is no executable for it left on the system?

How do I uninstall a Windows Service when there is no executable for it left on the system? I can not run installutil -u since there is not executable left on the system. I can still see an entry for the service in the Services console. The reason for this state is probably because of a problem in the msi package that does not remove t...

Need a way to check status of Windows service programmatically

Here is the situation: I have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states. Fortunately, it allows you to create custom actions in Java which can be called at any time during the installation...

c# windows-services - How do I handle logging exceptions?

I am creating a Windows service. When an exception occurrs, I handle it appropriately and create a log. I am using the decorator pattern, as there are many different ways people will be looking at these logs. I have an email logger, a file logger, and a windows event logger, all which inherit from LoggingDecorator, which implements ILogg...

My exe runs fine by itself, but does nothing when loaded by a service

Simple exe for a tray icon, that works fine independently I call it using a windows service, and it seems to run(in task manager) but it dosnt seem to exec any code. ie no tray icon etc. ...

A Service Loaded exe cant 'System.Diagnostics.Process.Start' a URL?

I have a simple Tray icon program that opens a site using System.Diagnostics.Process.Start("URL") And it works fine independently, however when a service loads it, it gives a file not found exception when trying to open the url, and after testing it can open normal extensions eg .txt (The service has desktop interaction enabled) ...

debugging a windows service, adding db logging to catch cluase a bad idea?

Hi, I have a windows service I am trying to debug. Is it a bad idea to add error logging in the Catch() clause? My logging is using a database to log the errors btw. ...

TService won't process messages

Hi there, I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messages don't work. Any ideas? thanks. ...

TService won’t process messages

Hi there, I have created a windows service that uses Windows Messaging System. When I test the app from the debugger the Messages go through nicely but when I install it my messag … asked 14 mins ago vladimir 1tuga ...

How to install a windows service programmatically in C#?

Hi, I have 3 projects in my VS solution. 1 is a web app, the other is a windows service and the last one a setup project for my web app. What i want is by the end of the installation of the web app in my setup project, within my custom action to try and install my windows service given that i have the location of the assembly by then....

Windows service on server wont run without a user logged in

I created a windows service that's basically a file watcher that wont run unless a user is logged into the machine its on. The service is running on a Windows Server 2003 machine. It is designed to move the files that are put into one directory into a different directory based on keywords in the file names, but none of the files move u...

How can I start my application as a windows service ?

I have a windows application that I want to run as a windows service - how can I do this ? ...

C# Service cannot execute batch file?

I have a service that call a batch file sometime. The batch file take 5-10 seconds to be executed. The code to launch the batch file is : System.Diagnostics.Process proc = new System.Diagnostics.Process(); // Declare New Process proc.StartInfo.FileName = fileName; proc.StartInfo.WindowStyle...