windows-services

with a running .net windows services, how to find out without stopping the service why it use so much memory?

The service was compile with no trace/debug constant and no debug info. How would you inspect the memory usage of that windows services? ...

Does ClickOnce auto update work for windows services applications?

I think the question is clear. ...

How to make GUI wait for windows service?

Hi all, I wrote a windows service and a gui for it. Of course gui mainly depends on the service. Is there a way for gui to wait for the service? Sometimes I need to reload service config from the gui and restart the service. I was thinking about 2 solutions: 1. using while and sleep to wait for service controller status to change (of c...

How can I send user credentials for use on a remote machine using WCF?

I have two machines, we'll call them machine A and machine B. Machine B is running a Windows service written in C#.net, as the Local System account. Machine A tells machine B's service (using WCF) to open a file located on the network. Since local system is not a network user, it does not have access to network files, and is unable to op...

Delphi 2009: How to communicate between Windows service & desktop application under Vista?

How can a desktop application communicate with a Windows service under Vista/Windows2008/Windows7? The application needs to send small strings to the service and receive string responses back. Both are written in Delphi 2009. (Please provide sample code also) ...

How to write to .InstallLog during Windows Service installation

I'm using C# with .NET 3.5 SP1 in Visual Studio 2008 SP1. I have a .NET Windows service that I install using the technique described by Marc Gravell here. This solution simply bypasses the need to use the InstallUtil executable directly, meaning that I do not have to include it in my InstallShield project. When the service is first in...

Installing a multi-file NT Service using WiX (2.0)

How do I install a service with some additional files in WiX, and define what file is the actual service EXE file? Scenario: I had a service which was just a single EXE file, and installed it as a Windows NT service in WiX with this code: <Component Id='InstallMyServiceComponent' Guid='{....}' DiskId='1'> <File Id='InstallMyServiceE...

Useful directory watcher service - why doesn't it work?

ServerFault suggested I ask here. I need a directory watcher to trigger a command line FTP client to upload some files to a server. I don't care for the idea of keeping a connection to the server all day, so I need a directory watcher. This looks perfect, and I have tried everything I know possible. But I have hit the limit of my kno...

Reading Excel Files as a Server Process

I'm trying to evaluate various techniques and libraries in an attempt to find a way to read Excel spreadsheets when running as a service on an NT server. So basically I'm looking for any methods/libraries that people know of that I can use. I need to be able to read .xls .xlsx .xlsm and .xlsb files. If anyone knows of anything else tha...

Monitoring a process in Windows

How can I monitor a Windows process and start it up if it is not running? I'd like to have something that starts up as a Windows service and can handle multiple processes. EDIT: Hopefully there's a ready to use library/component I can use and just tweak or configure instead of having to implement it from scratch. I know in the *nix worl...

Windows Activation Service on Windows 2003

I know (Windows Activation Service) WAS is advertised as part of Windows 2008/Vista/7 but since it appears under .NET 3.5 framework components in Control Panel Windows Components, I was wondering if anyone knows/has managed to run in under Windows 2003 as well. I'm trying to host a WCF server in WAS under Windows 2003 (written in .NET ...

How does one set up a WCF ServiceHost within a Windows Service that can access stateful information within the Windows Service.

I have a written a Windows Service in C#. It is functioning and performing well. I have added a WCF service to the Windows service to enable client applications to connect to the Windows service and obtain stateful information from the Windows service. I configured the WCF service to be a singleton, so that the same service instance is...

Installing multiple instances of the same windows service on a server.

So we've produced a windows service to feed data to our client application and everything is going great. The client has come up with a fun configuration request that requires two instances of this service running on the same server and configured to point at separate databases. So far I haven't been able to get this to happen and was ...

Caching for .NET (not in websites)

I need a cache that responds to memory pressure like the one build-into ASP.NET. I'm not using a web site, however, I'm building a Windows Service. Any suggestions? (code, techniques, products, I don't care as long as it's in-memory) ...

.Net Communicate with running service

I've written my first windows service in .Net. Can I communicate with this service from other .Net application? Can I execute methods on a service object from remote .net applications? ...

Run .NET Services from command line

How to run .NET services from command line? net start "Sample Service" is not working. ...

Unable to execute a program from a service

I have a Windows service which I want to periodically execute an external program. I'm currently doing this the usual way Process program = Process.Start(@"C:\mpewatch\db_parameters\DBParameters.exe"); This doesn't seem to be working. I'm executing this from a separate thread which is started in my service's OnStart handler. Is the...

confused over LocalSytem and LocalService Accounts.

i am new to windows services programming. I have confusion about what to set the Account type while writing a windows services. how to choose or how to determine to which account type we need to set while writing a service. ...

Hosting a WCF(mex endpoint) service inside a windows service on windows 2008

I'm hosting a WCF service inside a windows hosted service. When I start the WHS, I get the following error: The ChannelDispatcher at 'net.tcp://mysecreturl/' with contract(s) '"IClass"' is unable to open its IChannelListener. System.InvalidOperationException: A registration already exists for URI 'net.tcp://mysecreturl/Indexer/'. ...

How can one set up a thread in C# to only execute when CPU is idle?

I have a Windows Service in C#. I want a certain thread to perform specific actions, but only when the CPU is idle. Is there a way to do this in C#. ...