windows-services

How to schedule a C# Windows Service to run a method daily?

Possible Duplicate: How might I schedule a C# Windows Service to perform a task daily? I am creating a C# Windows Service, but I didn't figure out the best way to make timer fire a method daily at a specific time specified in App.Config file (e.g. daily at 6:00AM, my method is executed). How do you do it? Thanks ...

How do you access in-memory services from web applications?

Say I need to design an in-memory service because of a very high load read/write system. I want to dump the results of the objects every 2 minutes. How would I access the in-memory objects/data from within a web application? (I was thinking a Windows service would be running in the background handling the in-memory service etc.) I want...

Converting a Console Application to a service?

I'm looking for different ways with strengths/weaknesses for converting a console application we are using long term in to a windows service. We use something called java service wrapper for ActiveMQ, and I believe people have told me you can wrap anything with it. That's not saying that you should wrap anything with it though; we've h...

How to make a .NET windows service install without antivirus problems

Hey guys, I'm making my first windows service in C#, at the moment a pretty innocent looking thing that doesn't do anything yet. However I find when I try to install it, either using a standard Setup project in Visual Studio, or using the simple "self-installer" outlined here, our company's antivirus won't allow installation because it...

How to launch a GUI program in a Windows service?

When I run a service as LocalSystem account, I can use following codes to launch a GUI program under current login account: WTSGetActiveConsoleSessionId->WTSQueryUserToken->CreateProcessAsUser However, when I run the service as my personal account, the GUI program will NOT show up. I can see it in task manager though. What should I do...

Howto make this Windows-Service-Scenario as comely as possible

Hello and good morning! I have following scenario: We have a WebService which poses as a search-engine, used by WebApps But as we all know on 32bit systems and IIS6: 800Mb is the max. alloc-mem for a webapp... Now I had the following idea, as we are exceeding this limitation: Let the WCF communicate with a Windows Service, which isn'...

Install a service from command line (VB Express 2008)

I've been following a tutorial on http://michaelellerbeck.com/2009/01/12/creating-a-service-for-visual-basic-2008-express/ for creating a service using VB Express 2008. I got the first part working and managed to get the sample to install using InstallUtil, but the second part has you use a form with buttons to install and uninstall the ...

IPC windows service windows forms

I have an IPC problem. I have created into a windows service a NamedPipeServer: serverPipe = new NamedPipeServerStream(Constants.PIPE_NAME, PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); Thread thread = new Thread(new ThreadStart(pipeWork)); thread.Start(); where pipeWork is private static void pipeW...

FileSystemWatcher Fails to access network drive.

I am trying to run a file watcher over some server path using windows service. I am using my windows login credential to run the service, and am able to access this "someServerPath" from my login. But when I do that from the FileSystemWatcher it throws: The directory name \someServerPath is invalid" exception. var fileWatcher = ne...

Change Windows Service user programmatically

Hi, I need to change Logon user for a Windows service programmatically. And I am using the following code to do that: string objPath = string.Format("Win32_Service.Name='{0}'", ServiceName); using (ManagementObject service = new ManagementObject(new ManagementPath(objPath))) { object[] wmiParams = new object[11]; if (PredefinedAccount...

How to change user credentials of windows service from command line?

How to change user credentials of windows service from command line? ...

Monitor when an exe is launched

I have some services that an application needs running in order for some of the app's features to work. I would like to enable the option to only start the external Windows services to initialize after the application is launched. (as opposed to having them start automatically with the machine and take up memory when the application is ...

How to solve this specific threading problem

Using the code from the following article, I implemented an own ThreadPool: http://www.developer.com/net/article.php/3783756 This is what I want to achieve: Triggered through a Timer, a service should query a database every 5 seconds for new jobs to execute. A Job is basically only the information about a commandline program that needs ...

Adding Permissions to a Complex System

I have a project with several separate components that all need to talk to each other. I am now trying to find a good way to share a permission system between each component. The 3 major components are: An ASP.Net Web Application A Silverlight application (served by the web application) A Windows Service, which provides some WCF web ...

Restart Windows Service when faulted

Hi We have an windows service written in .net, that is hosting WCF service. My question is, Is it possible to monitor and restart service on any fault, in other world I want my service to be restarted automaticaly on any fault.Thanks a lot ...

Any way to save a graph as PDF using FusionCharts 3.1 inside a Windows Service?

I'm working on an asp.net website that uses FusionCharts v3.1 code to render graphs as swf files. I need to write code to allow users to re-create and email these graphs on a scheduled basis. Our product uses a service to take care of scheduling and email events so I need to modify the code to first render the data as a graph, save it ...

Why will this timer not start in a .net service application?

I have this code for a Windows service I am writing in .NET....However the TICK function never gets executed regardless of what interval I put in the tmrRun properties. What am I missing? I am sure its something stupid I am not seeing. Thank You Imports System.IO Public Class HealthMonitor Protected Overrides Sub OnStart(B...

Run services as different processes

I have five Windows services that all exist in the same exe. Is there a way to tell Windows to run each service as it's own process? ...

How to get Windows Service and ASP.NET MVC project interacting?

I've two separated projects being one of them a Windows Service having another one has a reference. I want my Service to call a method from the referenced project, something like this: protected override void OnStart(string[] args) { MessageSystem msg_system = new MessageSystem(); IQueryable<MensagemGrupo> mensagens = ...

Should I use a Windows Service or an ASP.NET Background Thread?

I am writing a web application in ASP.NET 3.5 that takes care of some basic data entry scenarios. There is also a component to the application that needs to continuously poll some data and perform actions based on business logic. What is the best way to implement the "polling" component? It needs to run and check the data every coup...