简体   繁体   中英

.NET Windows Service management and logging

I have application that runs non stop in the background on a dedicated remote server. The application is build in .NET 4 using log4net for logging and SQL Server.

I i think it would be best to use Windows Service for the main background application. I want to build a second application to manage and view the status and logs of the main application.

Any recommendation on the best way to do that? How should i connect to the service to get the status or attach to log4net logging?

Windows Service + Asp.net Website? Windows Service + Remote WinForms Application? On Server WinForms Application?

Thx!

I would recommend http://www.l4ndash.com/ . You just need to add a new web to your IIS and configure the dashboard. It can get information from the log4net files and/or the EventLog

We have a very similar setup and Windows Service + Asp.Net management/monitoring site works just fine.

If the application has to run all the time (especially regardless of whether there is someone logged in or not) then don't go down the server winforms application. Make it a service.

Having Asp.Net site for monitoring allows you to keep it in one place and update it in a single place. Imagine if you choose a 2nd option and create a separate "remote winforms" application. People will create copies of it and store them locally, different paths etc. It will be a night mare to update all these copies if you need to make any changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM