windows-services

Displaying Message Box using .NET Windows Services In Windows 7

一世执手 提交于 2019-12-10 11:25:23
问题 We had a windows service that was used to display a confirmation message box once a user scanned their access card on windows xp but once we migrated to windows 7, that pop up functionality no longer works. Can anyone please guide me through or give me any ideas on how to proceed with fixing this functionality asap? 回答1: As you have discovered, services now run in session 0 which is a non-interactive session. You cannot interact with the interactive user's desktop in the way that you could in

How to know which Local Application Connected to my socket (Windows)

元气小坏坏 提交于 2019-12-10 10:54:47
问题 I have a windows services that bind to some TCP port, this port is use for IPC between my application. Is there a programming (WinAPI/WinSocket and etc) way to know which application connected to my port? i.e. in my Windows Services I would like to get a PID of the process that connected to my port. 回答1: If you're looking for WinAPI way of doing the same as netstat . You probably want the following API: GetExtendedTcpTable Look for the results with TCP_TABLE_OWNER_PID_ALL argument. The

Displaying Message Box using .NET Windows Services In Windows 7

喜夏-厌秋 提交于 2019-12-10 10:15:27
问题 Displaying Message Box using .NET Windows Services In Windows 7 We had a windows service that was used to display a confirmation message box once a user scanned their access card on windows xp but once we migrated to windows 7, that pop up functionality no longer works. As described in this post Displaying Message Box using .NET Windows Services In Windows 7 , i have followed the instruction and it works when i run the application as console application but when i install it as a windows

Log4net and windows service. What else should I do to make this work

女生的网名这么多〃 提交于 2019-12-10 09:44:11
问题 Please help me, I want to run log4net on my windows service. And it is simply - mission impossible. First of all, with Win forms - work great. Here is what I do with windows service: Add to assembly: [assembly: log4net.Config.XmlConfigurator(Watch = true)] My config: <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <log4net> <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender"> <param name=

Communicating with a Windows Service

依然范特西╮ 提交于 2019-12-10 06:25:24
问题 I'm looking for the best way to use a Windows Service to manage a group of objects for use by several different client programs. The service must create the list of objects corresponding to physical or virtual devices, maintain information about what process is currently using a given device and what devices are available to be used, manage requests to use a given device by a process, return devices to an unused state. When I look at the Windows Service examples, though, there is very limited

Is it possible to serve a web page from a self hosted web API in a windows service?

拟墨画扇 提交于 2019-12-10 05:21:35
问题 I have a perfectly normal (TopShelf hosted) windows service. I have a requirement for a simple interface to the service which will return some current stats (held in memory). I had a cunning plan to self-host a website within the service, and I see that the asp.net API has a self host functionality. Is it possible to subvert the 'API'ness of the system and have it return simple (though not static) HTML that a browser could read directly? If not that are there any other options or ideas for

Windows Service w/ FileSystemWatcher in C#

↘锁芯ラ 提交于 2019-12-10 03:10:03
问题 I have to create a program that monitors changes in file size. I already made a simple windows service and filesystemwatcher so I am now familiar w/ the concept. I also made a code that checks for the filesize (made it in a form button)but haven't yet implemented in my filesystemwatcher. How do I create a windows service that has a filewatcher that monitors the file size? Do I have to put a filesystemwatcher inside the windows service and call the watcher via the OnStart method? 回答1: If you

How to use Fiddler to monitor a Windows Service?

戏子无情 提交于 2019-12-10 02:23:34
问题 It seems that Fiddler will not monitor anything that's not run under the same user as Fiddler itself. I would like to monitor a Windows Service which is run under Local System . Is this possible? 回答1: I made it work by referring Is there a way to configure Fiddler to intercept HTTP calls from a Windows service? Codeka provided a clue to get me going in the right direction. The piece that was still missing was how to get the proxy configured. The .exe.config needed to have a section like the

C# - windows service installer not registering service

一曲冷凌霜 提交于 2019-12-10 02:08:17
问题 I'm trying to use an installer for a Windows service, and would like to avoid using InstallUtil.exe. The installer appears to work correctly (the executable and dlls are in the correct directory), but the service doesn't appear under Computer Management. Here's what I've done so far: The service class name is the default - Service1. In the Project installer, the ServiceName of the service installer matches the class name - Service1. Under the Custom Actions, the primary output of the service

WCF Service Library hosted as a Windows Service using Castle.Windsor 3.0 issue

99封情书 提交于 2019-12-09 23:25:37
问题 I am wanting to host my WCF Service Library in a windows service. Although it will be communicating to another wcfservice over a local network. I am having great difficulty in finding recent, up-to-date documentation or help to configure the solution for this purpose. Can anyone advise: a) What the preferred endpoint for this kind of connection? (The other WCF service is hosted using a basicHttpBinding) - this in itself lends itself well to configuring the Castle container through hijacking