windows-services

Remote WCF Service

心已入冬 提交于 2019-12-13 00:49:01
问题 I build a WCF Windows Service and I want connect to it via Internet. So I was looking for a suitable binding. I decided to use wsDualHttpBinding. It is working so far if I use securityMode=None in my xml and ProtectionLevel=None in my ServiceContract. Now I have the problem that I cannot secure the connection between my Service and my Client, because I don´t want anybody to see any details during my Login process. When I use Message security and ProtectionLevel=EncryptAndSign I cannot access

events handling in windows services

[亡魂溺海] 提交于 2019-12-13 00:39:19
问题 I am new in creating windows services using C# framework 4.0, i have made a windows application that uses a DLL files to connect to a finger print attendance terminal. but i am confused in how to convert windows app to windows services. as i followed the tutorials i can run and install a simple services. but how to add new event in windows service so first i add reference to my DLL file in project. second i added this code in the InitializeComponent method private void InitializeComponent() {

Changing default culture for windows service running as LocalSystem

…衆ロ難τιáo~ 提交于 2019-12-12 22:41:33
问题 Our admins unexpectedly migrated a server where my .NET windows service runs (to Windows 2008 ... because of some old apps). It is running under LocalSystem account. The target framework is .NET framework 4 Client Profile. In my service the method DateTime.Parse now throws invalid format exception. When I add to OnStart Thread.CurrentThread.CurrentCulture = new CultureInfo("cs-CZ", false); it gets better, but still in some methods it fails, probably running in different therads. How to

How to bundle Electron application and windows service together?

荒凉一梦 提交于 2019-12-12 22:17:38
问题 I am very new with electron application. I need some help with election installation . I have an Electron desktop application and a windows service . I can start and stop my pre installed services by using sudo-prompt package. I am creating windows installer by using electron-winstaller package. But I want to bundle my windows service along with my electron application . My requirement is when I install my electron package then it should install my service also, when I uninstall my package

Interprocess communication with a Win32 service

↘锁芯ラ 提交于 2019-12-12 20:09:58
问题 The ControlService API allows one send a control code to a Win32 service. However, what if I need to send (and receive) more than a control code? What is the best way to establish communication between a user-mode GUI Win32 application and a Win32 service, to exchange arbitrary pieces of data? (Assume I can compile both the service and the application). The method should work from Windows 2000 to Windows 7, and it should work for both the administrators and the standard users. Thanks! 回答1: It

How to Fire Windows Service stop event on System restart?

半城伤御伤魂 提交于 2019-12-12 19:58:28
问题 I have written Windows Service in VC++ to mount Drives on System restart. Now when i restart the system, on system shutdown i want to fire my service stop event which is not getting fired. I have set Windows service properties as automatic but it does not work. When i manually click on stop button stop event get fired. Any help is apprecaited. My code looks like : void WINAPI ServiceCtrlHandler(DWORD Opcode) { switch(Opcode) { case SERVICE_CONTROL_PAUSE: m_ServiceStatus.dwCurrentState =

What would cause/how can I prevent a ContextSwitchDeadlock?

北城以北 提交于 2019-12-12 18:39:26
问题 I have a rather long-running process in a Windows Service that periodically throws a "ContextSwitchDeadlock" exception: I have also rigged my service to send myself emails with details about encountered exceptions. I get: Date: 05/25/2016 09:16:32: Exception message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Exception Source: .Net SqlClient Data Provider ...and then three seconds later this: Date: 05/25/2016 09:16:35:

I get a system.configuration.settingspropertynotfoundexception error in windows service

一曲冷凌霜 提交于 2019-12-12 17:26:01
问题 I have a windows app that uses SettingsProvider to read configuration settings and sets default values if file does not exist. It works fine running normally. I am trying to write a windows service that starts this app. When it is run by the service, I get System.Configuration.SettingsPropertyNotFoundException on all the setting attributes. How can I resolve this exception when the service is running the app? 回答1: This simply means that the app can't read the .Settings file. I can think of

Starting an Application from Windows Service

别等时光非礼了梦想. 提交于 2019-12-12 16:18:12
问题 I am building a Windows service that will watch for specific occurrences of events and disk activity. When such an event occurs my plan is to alert the user to the event via a client app, and provide remediation if necessary. I have (mostly) completed both the client and service components, which work great... unless the client app isn't running. In short, I am looking for a way to start up the client app from the Windows service via CreateProcess to provide information to the user. However,

Windows Service - Find out when the last user action was [closed]

删除回忆录丶 提交于 2019-12-12 16:16:25
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I wrote an application in Java and it's purpose is to log the last time any user action has taken place. When running this application logged in it works