Questions tagged [windows-services]

Windows services are background service processes run by the Service Control Manager on Windows NT based operating systems, similar to daemons or UNIX services.

Windows services, also referred to as NT services, are background service processes run by the Service Control Manager based on the service settings and optionally restarted as needed. Windows services are also capable of being launched on demand, based on other service dependencies.

See also Introduction to Windows Service Applications

8974 questions
3
votes
1 answer

WebApplicationBuilder vs IHostBuilder and lLogger

In a ASP.NET Core 6 project using a WebApplicationBuilder I am able to get a logger right after it is defined. This is very useful so I can use the logger in the rest of the application configuration. …
Stig
  • 1,974
  • 2
  • 23
  • 50
3
votes
2 answers

running UI with windows service

i am planning to run a launch/monitor a UI application using a windows service(written in C#).with "Allow service to interact with desktop " checked. this works fine with windows xp, but with windows 7 a pop is shown as below and when i click on…
DEE
  • 373
  • 5
  • 17
3
votes
1 answer

How create Windows Service from VS 2022 created gRPC server?

I've created a gRPC server in Visual Studio 2022 Community Preview by selecting the "ASP NET Core gRPC Service" template and .Net 6 Core. I intend to replace four existing .Net Framework Windows services who are all using WCF. So, I'm not looking…
Velocedge
  • 1,222
  • 1
  • 11
  • 35
3
votes
0 answers

Memory leaks in Http client in .net framework 4.5

I have a windows service application built with .Net framework 4.5. This service when kept running for a longer duration keeps on accumulating memory and slowly gradually it takes up to 100-200MB. The role of this service on broad level is to make…
3
votes
1 answer

Windows Service or ASP.Net+BackgroundService for REST API and infinite running background process?

I want to design an application that serves a REST API and also has a continuous process running that connects to websockets and processes the incoming data. I have two approaches in mind: Create a Windows Service with Kestrel running on one thread…
Tom2406
  • 31
  • 3
3
votes
3 answers

Can a service be started by normal user on Windows?

I have a service application created with Delphi, and managed to install it from another Delphi application using elevated privileges. The service is set to log on as the Local System account (which is default when creating a service application in…
user896166
3
votes
2 answers

How do you install a .NET 6 Windows Service (Worker Service) using a Visual Studio Installer project?

I Have a Worker Service written in c# that needs to be installed as a Windows Service (configured by calling the UseWindowsService method). This guide specifies how to create an installer for a .NET 6 application, but this installer only copies the…
mainvoid
  • 347
  • 1
  • 4
  • 17
3
votes
5 answers

Windows Service in .net cannot resolve tns service name

I have moved a component of our application from a webservice to a Windows Service. It connects to oracle perfectly from the webservice but refuses to see the Tns names from the Windows service. I have given full control to the ORAHOME dir to the…
David Evans
  • 181
  • 1
  • 9
3
votes
1 answer

Environment.GetFolderPath(…CommonApplicationData) returning Empty string on XP and Server 2003

This seems to have happened completely randomly. One minute the program was working, then I made some changes (completely unrelated to this part of the program, all I actually changed was one of the embedded resources of the project) and the…
Connell
  • 13,925
  • 11
  • 59
  • 92
3
votes
0 answers

What is the recommended approach to collect and send metrics to Prometheus for .Net Core Worker Service?

I have a .net core worker service which will run in the background. I would like to capture metrics about the health status of the service and it needs to be consumed by Prometheus. What is the recommended approach whether we need to use default…
3
votes
4 answers

debugging window service

I want to debug window service. What should i write in main() to enable debugging in window service. I am developing window service using C#. #if(DEBUG) System.Diagnostics.Debugger.Break(); this.OnStart(null); …
Denish
  • 983
  • 1
  • 13
  • 20
3
votes
2 answers

Keeping a C# Mutex Alive in a Windows Service

I've written a C# Windows Service application that reads a file via a timer delegate every 20 minutes or so, deserializes the content, and then clears the file. The file is written to by one or more client applications running on the same machine…
Jeffrey Kevin Pry
  • 3,266
  • 3
  • 35
  • 67
3
votes
3 answers

database connection doesn't work when service starts at boot but works when it's manually started

I'm trying to track down possible causes of my app not being able to connect to a db server. I have a windows service that connects to the database when it starts. The service runs on machines with a reliable wired network connection. It's…
Rory
  • 40,559
  • 52
  • 175
  • 261
3
votes
2 answers

msiexec.exe -Embedding

I am using a cloud based EDR platform to monitor processes occurring on a client's compromised network. Something I have seen a lot of recently is msiexec.exe called with the option "-Embedding" C:\Windows\System32\MsiExec.exe -Embedding…
3
votes
3 answers

How can I run a Windows application before a user has logged in?

Possible Duplicate: How can a WPF application be launched before I logon to Windows? I have written a application in C#. I want to run my application before logging into Windows OS (after Windows OS pre-loading). How can I do that?
MaxCoder88
  • 2,374
  • 6
  • 41
  • 59