windows-services

Calling a web service from a windows service

I'm sure there's an elegant solution to the problem but I just can't get my head around it. I am trying to call a web service from within a Windows service. The web service is secured (using Windows authentication). The account that the windows service runs under does have the rights to call the web service but I can't figure out how to ...

Is it possible to log who started or stopped a windows service?

I have some windows services written in C#. When somebody stops or starts the service, I would like to be able to determine who is was and log that information. I tried logging Environment.UserName but that evaluates to SYSTEM even on my local machine. Also, for the time being these services are running on Windows 2000 server. ...

Windows Service running as a logged-in user has access issues b/c of UAC

I have a Windows service that runs as a logged-in user (local admin). During start-up, I get a message along the lines: "Unable to generate a temporary class (result=1)". So, I went to windows/temp folder and was prompted by UAC to elevate my privileges -- after I did this, the service would start up fine. So, how do I deal with this UA...

create service on windows

I am having trouble starting my service on my pc. My code is based on this article http://www.gamedev.net/reference/articles/article1899.asp When i call installService from my int main(int argc, char *argv[]), it is registered successfully (i can see it in msconfig and services.msc). However it has not started. I manually start the serv...

How might I schedule a C# Windows Service to perform a task daily?

I have a service written in C# (.NET 1.1) and want it to perform some cleanup actions at midnight every night. I have to keep all code contained within the service, so what's the easiest way to accomplish this? Use of Thread.Sleep() and checking for the time rolling over? ...

Scheduled console app vs Windows service? When is it appropriate to use each

I just read this: http://stackoverflow.com/questions/442264/what-is-the-benefit-of-developing-the-application-as-a-windows-service but I'm still unsure of when to use a windows service. I have a couple tasks that need to be run at intervals (i.e. every 5 minutes). Which project type should I use? Are there any examples of the types of a...

Credential storage best practices

I'm writing a Windows service and need to make authenticated web requests. The service will not be running under the ownership of the credentials used to make the request; this implies that I need to store the credentials for the request in some way. What are the best practices here? The credentials will need to be stored in App.config ...

WCF Self-hosted service, client clean-up on service stop

Hi everyone, I'm curious to know how I would go about setting up my service to stop cleanly on the server the service will be installed on. For example when I have many clients connecting and doing operations every minute and I want to shut-down the service for maintenance, how can I do this in the "OnStop" event of the service to then...

C# Windows Services

Hey guys, I'm wanting to learn about creating windows services with C#. I've googled around a bit and I've found a few tutorials. I was wondering if there are any frameworks that I could use that would help with designing the services. I've searched various online book stores for books on the subject; however I've come up short. If yo...

Offscreen rendering to a texture in a win32 service

I'm trying to write a C++ windows service that can render to a texture. I've got the code working as a regular console app, but when run as a service wglGetProcAddress() returns NULL. Can anyone tell me if this is possible, and if so, what do I need to do to make OpenGL work inside a service process? Edit: I still haven't got this ...

c# windows service causes entire machine to hang indefinitely/crash

I have a C# 2.0 windows service (100% managed code) and occasionally when it is started/restarted it causes the entire machine (Windows Server 2003) to hang indefinitely. When I click “Start the service” the service control progress bar gets halfway then the machine becomes completely unresponsive at the local terminal and remote deskto...

What is the best way of working with Services in a VB.NET application?

I'm using VB 9 (VS2008). I would like to know how to do the control Windows Services through an Windows Forms application. I want to know: How to determine the status of a service? How to change the Startup type of the service? How to start, stop, pause and resume a service? Thank you! ...

Changing the service's startup-type (Windows)

I was searching for ways to change the start-up type of a Windows service and I found 2 ways to do this... By editing the Registry Or By using the WMI classes I want to know which one is the best... I want my application to run properly on both Windows and Vista. ...

Login method Customization using GINA

Hi All, I know it's not easy to find a master in GINA, but my question is most near to Interprocess Communication(IPC), I wrote my custom GINA in unmanaged c++, I included it a method that checks for validity of a fingerprint for the user try to login, this function will call some method in a running system windows service written in c#...

Login method Customization using GINA

DUPLICATE:http://stackoverflow.com/questions/523912/login-method-customization-using-gina Hi All, I know it's not easy to find a master in GINA, but my question is most near to Interprocess Communication(IPC), I wrote my custom GINA in unmanaged c++, I included it a method that checks for validity of a fingerprint for the user try to...

C#, how to restrict to one method call at a time?

I'd like to know how to implement the following restriction: One method in my Windows Service should not be called again before the earlier call has been finished. The method in question goes thru couple of database tables and it's very important that this process won't be called again before it's finished. I have a setting that defines...

Windows Service notifying user with WPF outlook style control not becoming visible....

Update: We are still using XP at work and I got my solution working, but now knowing that Vista and beyond have the isolated session I am going to implement a WCF IPC... I have a windows service that needs to notify the user of an event of some type occurring. I decided that something similar to email notification messages would make s...

Windows Service Stops Automatically

Hi All, I made a window service and let it work automatically and under localsystem account, when the service starts it fires this message for me and then stop "The [service name] service on local computer started and then stopped. Some Services stop automatically if they are not in use by another services or programs." Whats the probl...

Create GUI from Windows Service with a Network Log on

I have been reading a lot about executing a GUI application from a Windows Service. The "Allow service to interact with desktop" check box worked for me when the Service runs as the SYSTEM user (I am using Windows XP). Now I need the Service to run as a User defined in a domain (from the network). Everything works fine (even if no user i...

WCF has its own web server?

I just discovered, quite by accident, that a WCF service hosted in a Windows Service ill work with a HTTP binding. It seems to implement its own web server, but I have never seen this capability mentioned anywhere, and can't find any documentation on what the capabilities of the HTTP listener are (in terms of worker threads, etc.) Anyo...