How to know who started/stopped windows service in .NET
Is the way to check in ServiceBase's void OnStart, void OnStop methods, who initialized action? I need username to write it into log. ...
Is the way to check in ServiceBase's void OnStart, void OnStop methods, who initialized action? I need username to write it into log. ...
Here's an odd situation, if I open a command prompt and start the mongrel server then everything works swimmingly. ActiveRecord talks nicely to the MSSQL server using ODBC if I have a User-DSN defined. But if remove the User-DSN and set just an identical System-DSN then odbc bombs: [Microsoft][ODBC Driver Manager] Data source name ...
Searching for books about Windows NT Service programming, I found "Programming Windows Services" by Randy Morin, and "Professional NT Services" by Kevin Miller. Both books are quite old. Does anyone know of more recent resources (book or other) about NT service development? ...
Hello all, I am totally a newbie to VB.net, now I am developping a Windows Service, which will start an *.exe when starting. How can I detect and re-start a process of this executable if it got killed by some other program? My code is as below: Public Class MyWinService Dim RetVal Protected Overrides Sub OnStart(ByVal args() As Stri...
I have recently switched to Windows 7 as my development machine. One of the components of the software that I work on is a Windows service. One of the tricks I use to debug the service is to make the service registry values point to my debug build of the service. I then start the service and attach to the process using VS.NET. However, ...
I have a WCF service being hosted in a Windows Service (using techniques discussed here) and it works great. I'm now writing a (VB.Net) frontend app that needs to call that service, but I don't want my users having to fiddle around with the services snap-in and starting the service manually. Can I write some code to ensure the Windows S...
I'm building a Windows service that performs different actions based on which Windows user is logged in. If I install my service under one user, and set it to start-up, will a separate instance of it run for each user that logs in, continuing to run, even if more than one user is currently logged in? This is the behavior I would like, b...
I just created a simple .NET Windows service. My users are supposed to download it from my site and install it on their computers. So, from various forum posts (including this site) I know that in order to do this I need an installer. Or I can just give them service files and instruct how to install it. I begun with creating a setup proj...
Hi everyone, I'm new to windows services, so pardon the basic nature of this post. I've been tasked with updating an existing service and had some questions about how they work and keep running in the background. I assume a loop of some sort is usually in play, but in the case below I'm not sure how it works and why it doesn't stop ...
I have written a Windows service, of which I want to have 1 instance running per customer. This is because the customers each have their own DB with identical schemas; the only difference between the Windows services is that they will each have a different parameter corresponding to the customer DB that they're designated to serve. (An...
Hi, We have WCF service using Integrated windows authentication deployed on a dedicated server. There will be Windows Service on Client machines[windows service uses Local System Account].We get an error when the WCFServiceClient in Windows service accesses the WCF service.[If windows service is on server machine it works fine] System....
Have a webservice call from within a c# windows service. Service is behind an SSL cert. Certificate was registered into trusted root (password provided by provider). Problem is that from the development machine verything works perfectly but once deployed onto production server, we keep on getting a 403 error. Can browse to the service...
I have programmed a Windows Service in C# which should connect to an SQL-Server 2005 Express Database with System.Data.SqlClient. As Microsoft prefers to use Windows Authentication over SQL Authentication I tried to connect to the DB with Trusted Conenction / Integrated Security. However that doesn't work as I get a System.Data.SqlClie...
PowerShell Script Running as a Service Behaves Strangely The Project: Create a background process that determines if the on board network card is connected. If it is connected, disable the wireless network card. When the onboard network card is not connected, re-enable the wireless card. Why: Users hot-dock all the time, getting funky ...
I'd like to write a service (that starts up and runs whenever the machine is on) that queries Active directory since the user IIS uses does not have permission to query AD. How do I determine if A) my workstation where I have local admin rights, and B) a shared team workstation will allow me to do this? ...
I have a Windows service and an MSI installer (setup project) for it. The setup project has custom actions for install and uninstall with args of /install and /uninstall respectively. I would like the service to start immediately after the install. All my service does is starts a process. When the service is stopped, it does process.Clo...
I created a Windows service and installed into users machine. That windows service is very important and I do not want to user can change its startup type to "disable". It seems "Plug and Play" service can disable the Startup drop-down listbox. How can I make same behavior for my windows service? ...
I am attempting to install a C# windows service project using a VisualStudio.Net deployment project. To run the deployment project I right-click and select "install" from the context menu, the install wizard runs and eventually prompts me with a "Set Service Login" dialog which asks for username & password. Do I have to create a lo...
I want to create a windows service that would start before user can login. I want it to start before login so I can remove a user (windows user) from group (HomeUser to be precise), so I dont have to re-login. So I want to: Create a service that starts before user can login Remove a user from group. Any idea how this can be accompl...
I have a Windows service that should run for all users that needs to know which user is currently logged in. I'd like to write an app that gets started when a user logs in that will alert the service that that user is the one that's currently logged in. It would also need to handle when the user is switched (meaning both are still runnin...