windows-services

WCF Self Hosting Performance

I am in the process of writing an enterprise-level application utilizing WCF and NetTCP services. I chose NetTCP initially out of curiosity, but later determined it to be the best option for me since I can have services that are called that take 5+ hours to return results due to the amount of data crunching involved. The way I currently...

Windows service shutting down cause of being idle

I've build a vb.net windows service which does nothing but ping a wcf webservice and handles sending a maintenance request to this same webservice at night time. It does both tasks using a timer event. If the service does nothing but these two things it says at startup that it's shutting down cause of being idle. The windows service thre...

RemotePrintServer

Is there a way to print to a RemotePrintServer in .NET Windows Service? I'm reviewing a piece of code where a LocalPrintServer is used, but I need to be able to send the print jobs to a remote print server. Any ideas? ...

How should a Windows Service return information from a custom command

I have a windows service running as part of my application. If I wish to communicate with it via the service handle I can issue custom commands (eg, 'start worker'). Ultimately, this will be a call to the Win32 ControlService() function. What is the best way to return a block of data from such a command? Specifically, I want to return ...

python service restart (when compiled to exe)

I have a service, as follows: """ The most basic (working) CherryPy 3.1 Windows service possible. Requires Mark Hammond's pywin32 package. """ import cherrypy import win32serviceutil import win32service import sys import __builtin__ __builtin__.theService = None class HelloWorld: """ Sample request handler class. """ def __i...

submitting to and monitoring an unreliable webservice

I am building an ASP.NET website which will collect data from a user and submit it to a 3rd party webservice. The webservice is somewhat unreliable and for this reason there is a backup service. If a call to the primary service fails (timeout or some other error) then I need to flip a bit in a static class which will trip the system to ...

.NET Windows service not working in Windows Server 2008

I developed a Windows service which is running without any problem in Windows XP service pack 3. When I deployed this service in Windows Server 2008 it is not working. The service started without any problem. I enabled the option Windows XP service pack 2 from the compatibility property of the .exe which deployed there. But no more act...

What are the differences between a web service and a Windows service?

What are the differences between a web service and a Windows service? My experience has mostly been with Windows services, and I have never created a web service. Do web services behave similarly to Windows services? Can they have scheduling, run at certain times, etc.? When you would use a web service in place of a Windows service, a...

Automatically start a Windows Service on install

I have a Windows Service which I install using the InstallUtil.exe. Even though I have set the Startup Method to Automatic, the service does not start when installed, I have to manually open the services and click start. Is there a way to start it either via the command line, or through the code of the Service? ...

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154.

I developed a Windows service using C#.NET to generate PDF report. To generate PDF file I am using a third party dll. The application is running in my Windows XP platform. When I deployed the service in Windows Server 2008 64 bit version, I got this error: Retrieving the COM class factory for component with CLSID {46521B1F-0A5B-...

Using windows services [written in C#] using C#

I wrote a windows service in C# that does some functionality (a public method) after reading a file at regular intervals. Is it possible for me to use this functionality from another C# application ? If possible, please give a solution based on .net 2.0 as well as .net 3.0 Thanks ...

What is the accepted pattern for an application that can be run as a service or as a console application

I have a project that is deployed to production as a windows service. However for local development purposes it would be useful to run it as a console application. At the moment I have a class Called ReportingHost that provides my core functionality, And a class called ReportingServiceHost that inherits from ServiceBase and allows me to ...

How to get service executable file path.

Hi, Is there anyways to get the executable file path of a running Windows service without requiring administrator execution level privilege in .Net? (Without causing the UAC to get the user's confirmation) ...

Accessing SQL Server from windows service

I am trying to connect SQL Server from a Windows service. Now my Windows service is installed in different system. Now if I want to connect to my SQL Server, how can I connect? I am able to connect if I add the respective system userid in the SQL Server login users. I don't think that is the right way..because if i required to install th...

Can't run a service under an account which has no password?

I can start the service correctly if the service's "Log on" account has a password. But when I remove the user password and try again, I got the error: "Error 1069: The service did not start due to a logon failure" Can't a service runs under an account with empty password? ...

Installing a Windows Service with dependencies

Hi all, My installer program doesn't suppport installing services but I can run a program/command line etc so my question is how can I install a Windows Service and add 2 dependencies using the command line? The program is a .Net 2.0 app. Thanks ...

Are there any log file about Windows Services Status?

I want to figure out when the services was start up and terminated. Are there any kind log file about it? ...

Specify Windows Service Name on install with Setup Project

Objective: In support of a Windows Service that may have multiple instances on a single machine, use a Setup Project to create an MSI capable of: Receiving user input for Service Name Installing service Serializing Service Name from 1 (so that the proper name can be used in logging and uninstall) My initial hope was to set Service Na...

.Net 2.0 Windows Service Process Communication: Database or IPC?

I have a Windows Service running on a .Net 2.0 environment (NOT UPGRADABLE TO 3/3.5). The service uses a System.Timers.Timer on a X second Interval to poll for items on a database table. The Timer.Elapsed event handling code is wrapped around a lock statement to prevent the next Elapsed event of running if the previous processing has no...

Call A Windows Service from a remote computer

I am going to be coding up a windows service to add users to a computer (users with no rights, ie just for authentication). (As a side note, I plan to use this method.) I want to be able to call this windows service from another computer. How is this done? Is this a tall order? Would I be better off just creating a Web Service and h...