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
4 answers

How to allow an App.config under Program Files to be editable by a user is Notepad or another editor?

I'm having an issue that I have not encountered before where App.configs for Windows Services that are installed under the "Program Files (x86)" directory are locked for editing even when the Windows Services are not running. I get a message that…
AudioFrk
  • 111
  • 2
  • 8
3
votes
3 answers

How to programatically grant a virtual user permission to a folder (or file)

I have a service that I wrote that I need to deploy to a number (about 1100) devices. All of these devices are logged in as a regular user, not an administrator. I can push out the service with our deployment software, which does run as an admin.…
Harlan
  • 133
  • 1
  • 3
  • 15
3
votes
2 answers

Deploy a windows service in azure kubernetes cluster

I want to deploy a windows service in azure cluster. I have created the yaml file, which deploys the service, however when I run kubectr get pods I get the following, NAME READY STATUS RESTARTS …
Garry A
  • 383
  • 5
  • 19
3
votes
1 answer

AzureDevOps commandline as administrator

I would like to stop Topshelf service using cmd task in azure devops release pipeline. What I do is create CommandLineTask which following script: ServiceName.exe stop As an output I see v3.1.4 2020-06-05T10:14:20.1312163Z The ServiceName service…
miechooy
  • 3,178
  • 12
  • 34
  • 59
3
votes
1 answer

windows service & updating c# console app

I have a windows service that executes a console app every hour and it's running with no problems. I didn't set this up though, and I'm not familiar with windows services at all. Today I had to update the console app, so I presumed that if I just…
user441365
  • 3,934
  • 11
  • 43
  • 62
3
votes
2 answers

Getting server restart count in a day using c#?

Is it possible to get the number of times a server gets restarted in a period of time using c#? I have seen this post which is getting windows last shutdown time Get the date-time of last windows shutdown event using .NET Any suggestion?
bala3569
  • 10,832
  • 28
  • 102
  • 146
3
votes
3 answers

Tomcat service: quotes in wrapper.conf

I wanted to set up remote debugging from Eclipse. Tomcat is running as a service on windows. That bit is fine, a quick google pointed me towards the correct settings to add to wrapper.conf to enable this. There were entries already in…
evnafets
  • 562
  • 4
  • 10
3
votes
1 answer

Writing a cross platform GUI/service

I'm working on a project that requires a desktop client to scan certain directories on a users computer at set intervals. My plan is to separate the actual directory scanning code out of the GUI and into a service so that it can run even when the…
Ian Burris
  • 6,325
  • 21
  • 59
  • 80
3
votes
1 answer

Register Hosted Services based on Configuration in .NET Core Worker services

In .NET core 3+ worker service we can register multiple worker services using the ConfigureServices under the CreateHostBuilder method as below Host.CreateDefaultBuilder(args) .ConfigureServices((hostContext, services) => { …
3
votes
1 answer

C# Windows service OnPreShutdown takes the full 20 seconds

I wrote a C# windows service running under the local system account. I need to do something when the system shuts down, and hooking to the pre-shutdown event works fine. I am accepting the preshutdown command by setting the right flag: FieldInfo…
user13092948
3
votes
1 answer

Python3.7 Service Error 1063: The service process could not connect to the service controller

i can't figure out why i can't start the service in the code below. I can install it and run it in debug (here i can't stop the service without closing the console) mode, but start raises this error: 1063: The service process could not connect…
Luca
  • 344
  • 5
  • 18
3
votes
2 answers

Https calls are not connecting to server

I am working on Windows Service in visual studio 2017. In the rest api's call, getting exceptions while debugging code. Sometimes first 2 3 calls working after that getting exceptions. System.Net.WebException: 'The remote server returned an error:…
R15
  • 13,982
  • 14
  • 97
  • 173
3
votes
1 answer

How to use ServiceControllerPermission

Can anyone provide a code example, or some information on how to use the ServiceControllerPermission class? The best I can find is a very short example on this site, which demonstrates use of the Assert() method, but there is little explanation, and…
Ronnie
  • 1,059
  • 14
  • 27
3
votes
1 answer

How to use PRISM within C# windows service applications?

I'm trying to create an windows service application which i would be able to add modules in it as we do in WPF and Silverlight. This is how i went throw : public static class Program { public static string CurrentAppPath { get; set; } …
Ehsan Zargar Ershadi
  • 24,115
  • 17
  • 65
  • 95
3
votes
0 answers

Quartz.Net schedule runs from console app but not from deployed Topshelf windows service

I have a .NET windows service that is using TopShelf and Quartz.Net. My scheduled jobs only get triggered when I run my Topshelf console app (.NET framework 4.7.2) locally. When I deploy them as a Windows service on the same machine or on a remote…
Yasir
  • 1,595
  • 5
  • 23
  • 42
1 2 3
99
100