Question

I want to display certain events from the event log on a web page. For this I have to use a MVC4 application in .NET framework version 4. I've read about SignalR and push messages, but I can't find any clear information on how to implement this. Perhaps I am searching for the wrong things.

Can anybody point me to a tutorial on this subject or explain how I can realize a part on a webpage where about the 5 latest relevant events (based on category) are displayed?

Was it helpful?

Solution

Assuming you don't want to update your page in real-time then you can use something like

var eventLog = new EventLog("logName", "machine", "source");
foreach(var entry in eventLog.Entries)
{
}

to read the event log data and then pass it to your view model.

You would only need SignalR if you wanted to push updates to your your page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top