windows-services

Localizing Windows Service

不羁的心 提交于 2020-01-23 07:29:47
问题 I have been searching for a long time but the topic seems to be quite special. I didn't come up with anything. Maybe the specialists arounf here can help me. I run a Windows Service which accesses some databases and does some calculation. If something fails, then that will result in an entry in a log file. My wish is to lacalize these entries. This worked fine with every project so far except for this Windows Service. I use the resource manager and localized resources files. During runtime

Localizing Windows Service

最后都变了- 提交于 2020-01-23 07:28:04
问题 I have been searching for a long time but the topic seems to be quite special. I didn't come up with anything. Maybe the specialists arounf here can help me. I run a Windows Service which accesses some databases and does some calculation. If something fails, then that will result in an entry in a log file. My wish is to lacalize these entries. This worked fine with every project so far except for this Windows Service. I use the resource manager and localized resources files. During runtime

Quartz Job Scheduler in Windows Service

只愿长相守 提交于 2020-01-23 04:00:34
问题 I have this windows service project which's OnStart method looks like this protect void OnStart(string[] args) { IScheduler someScheduler = _schedFactory.GetScheduler(); // _schedFactory is a priva field of the service class IJobDetail someJob = JobBuilder.Create<SomeJob>() .WithIdentity("SomeJob") .Build(); ITrigger someTrigger = TriggerBuilder.Create() .StartAt(new DateTimeOffset(DateTime.UtcNow.AddSeconds(30))) .WithSimpleSchedule(schedule => scheduler.WithIntervalInMinutes(3)

Windows Service started and then stopped using Topshelf

南楼画角 提交于 2020-01-22 20:29:16
问题 I am using Quartz.net and I am trying to get the Quartz server to start-off in a Windows Service. I have created a Windows Service Project and included the Quartz.net libraries. In my Service class I have: protected override void OnStart(string[] args) { try { Host host = HostFactory.New(x => { x.Service<IQuartzServer>(s => { s.SetServiceName("quartz.server"); s.ConstructUsing(builder => { QuartzServer server = new QuartzServer(); server.Initialize(); return server; }); s.WhenStarted(server =

Instrumenting windows service with Application Insights

断了今生、忘了曾经 提交于 2020-01-21 17:24:08
问题 Is it possible to instrument a windows service running on premise with Application Insights? It's not necessary to have it automatically collecting metrics of the application like it does with Web applications, pushing custom events to Azure would suffice. 回答1: I'll make the docs a bit more clear on this. You can instrument anything if there's a core SDK that will build with it. So any kind of .NET, Java, PHP, OSX, iOS, Android, .... If you want additional modules that log web requests,

set file permissions for c:\program files\company\app\file for all users

我只是一个虾纸丫 提交于 2020-01-21 15:18:51
问题 I've a custom installer program that has worked fine, but it asks the user for admin permission every time it updates an application. I'm creating a windows service that skips this part, but the windows service gives only System and Administrators permissions to the file, and the user cannot execute the new updates. To correct this I'm trying (after the file downloads/installs to the correct place (from within the windows service, it has the account ServiceAccount.LocalSystem), FileSecurity

Need a way to check status of Windows service programmatically

╄→尐↘猪︶ㄣ 提交于 2020-01-21 04:25:06
问题 Here is the situation: I have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states. Fortunately, it allows you to create custom actions in Java which can be called at any time during the installation process (by way of what I consider to be a rather convoluted API). I just need something that will tell me if a specific service is started or stopped. The IDE

Setting recovery options on windows services

核能气质少年 提交于 2020-01-19 05:19:40
问题 I've recently written a small class to help me change recovery options on a windows service (most of code I found online somewhere). The code creates a FailureAction for the first, second, and subsequent failures. Each Failure object contains a type (None, Restart, Reboot, RunCommand), and a Delay (int) in milliseconds. These objects are packaged inside a struct and passed into ChangeServiceConfig2 (WinAPI P/Invoke). However, when I actually right-click on a service on the console and go to

Setting recovery options on windows services

痞子三分冷 提交于 2020-01-19 05:18:35
问题 I've recently written a small class to help me change recovery options on a windows service (most of code I found online somewhere). The code creates a FailureAction for the first, second, and subsequent failures. Each Failure object contains a type (None, Restart, Reboot, RunCommand), and a Delay (int) in milliseconds. These objects are packaged inside a struct and passed into ChangeServiceConfig2 (WinAPI P/Invoke). However, when I actually right-click on a service on the console and go to

Setting recovery options on windows services

守給你的承諾、 提交于 2020-01-19 05:18:05
问题 I've recently written a small class to help me change recovery options on a windows service (most of code I found online somewhere). The code creates a FailureAction for the first, second, and subsequent failures. Each Failure object contains a type (None, Restart, Reboot, RunCommand), and a Delay (int) in milliseconds. These objects are packaged inside a struct and passed into ChangeServiceConfig2 (WinAPI P/Invoke). However, when I actually right-click on a service on the console and go to