windows-services

Windows Service: EF + MySql without app.config

浪尽此生 提交于 2019-12-11 19:47:07
问题 At the moment I'm writing a windows service. I'm already using EntityFramework with MSSQL database which is working perfectly. Now I have to use MySql parallely. But I can't manage to get it running ... I would like to avoid using the app.config and configure EntityFramework via the constructor of my class derived from DbContext. I have a SqlContext class: public class SqlContext : DbContext { public IDbSet<ServiceauftragSource> ServiceauftragSource { get; set; } public SqlContext(string

Cannot start the windows service

风流意气都作罢 提交于 2019-12-11 19:39:41
问题 I created a wcf library. then i write wcf service which do create or open a file and writes "hello world" in that file. then i added new project to add windows service. in that windows service onstart() method i call the wcf service. then i build and installed the service using installutil. the service was installed successfully. while i am starting the service in services.msc, it shows the following error "the service on local computer started and then stopped some services stopped

Stop Windows Service and avoid time out warning message

谁都会走 提交于 2019-12-11 19:36:09
问题 I have implemented a windows servcice which is intended to start a business process in a scheduled manner. Once the buisiness process is started, it shouldn't be terminated by stopping the service. Hence I used the following OnStop method: protected override void OnStop() { /* * Check, whether the business process is currently running; */ if (_sh.IsBusinessProcessRunning()) { eventLog1.WriteEntry(String.Format( "Stop instruction received! Service will be stopped, as soon the process '{0}' has

Volume changes without creating notification for IAudioEndpointVolume

▼魔方 西西 提交于 2019-12-11 19:09:54
问题 I'm have written a C++ application that is running as a Windows service to limit the volume of a Windows 7 computer. The user can specify different rules for different days and times and the service will smoothly change the volume. To implement this I use the IAudioEndpointVolume interface. In general it works like intended... However, there exists a strange behavior I cannot explain yet. When switching users the volume suddenly drops but it does not generate a notification as one would

How do I find a .NET remoting memory leak on select machines?

ε祈祈猫儿з 提交于 2019-12-11 18:43:36
问题 The memory leak is not happening on every machine, but reliably on a couple at my work, and it's looking like close to 10% in the field. I have a product that uses a Windows service to monitor user input to launch alerts, paired with a visual application that serves only to sit in the system tray, and allow the user to make configuration changes. I chose to use a remoted object to share the configuration information between the two processes. In the service it is called serviceConfig, and in

Exception causing windows service to crash on ending distributed transaction with NHibernate

旧城冷巷雨未停 提交于 2019-12-11 18:30:52
问题 I have a windows service written in the .NET 4.0 framework that uses NHibernate enlisting in a distributed transaction talking to an Oracle database. Within our test environment the service encountered an error with the database which seems to have caused a problem with NHibernate closing the ADO.NET connection. The entire call against NHibernate, from opening the session to disposing of it, is wrapped within a try/catch block that catches System.Exception but the error is not caught within

How to authenticate users every time they send print commands

荒凉一梦 提交于 2019-12-11 18:24:50
问题 Need an idea to write a code to authenticate users before they send the commands to print. Initial idea is to create a windows service which could bypass the call to the printer driver and can open a form for login credentials. so that only the authenticated users who qualifies the monthly quota for printing the pages could access the printer. Please share your views whether this approach is feasible and how this can be achieved. 回答1: You can monitor the Win32_PrintJob WMI Class or the

Call windows application in windows service

限于喜欢 提交于 2019-12-11 18:05:01
问题 I am working on something similar to this question asked in 2010 How to call Windows application using Windows service in C#? This answer might be the solution to my problem https://stackoverflow.com/a/2309089/1270384 Although I don't know how to do that. Was wondering if somebody could give me an example of what is being mentioned or something similar, namely the process class being mentioned or just a brief example of how to go about the instructions given. Update I have a web application

Decrypt Xml file with asymmetric key windows forms and windows service

僤鯓⒐⒋嵵緔 提交于 2019-12-11 18:04:17
问题 I'm developping a winforms application using .NET3.5 (C#). And for the protection of the application, I used an Xml file, whitch should should be crypted using an asymmetric key. Now, My application has two part, the windows forms part, and the windows service part (who check the authenticity of the application). So, my file will be crypted/decrypted by the two parts. And this is where the problem appear. When the win forms part try to decrypt the file already creapted by the service, an

how to set windows service in hudson 1.398

最后都变了- 提交于 2019-12-11 17:53:32
问题 I just looking Hudson two days ago. So i am very newbie. I download hudson 1.398, searching about windows service. But in manage Hudson there doens't have install as windows service like other version. How i can make it in hudon 1.398. And there any good tutorial, easy to understand, and full complete tutorial.. Thank you. 回答1: From the wiki: Installing Hudson as a Windows Service. Make sure .NET 2.0 is installed (on the server, I presume). 回答2: owh i see the problem. Because i use tomcat to