Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

In similar fashion to this bit of node.js, I'm interested in streaming the ongoing output of a text log file via ASP.NET MVC.

I'm having trouble even thinking how I would implement this using the APIs available via the .NET framework. At least, the streaming of new file content as it is written part. if I were able to get that data/notification when new lines were added to a file, I could probably just write it to the browser using SignalR/websockets.

Asked a different way, how would the above-linked node.js script be able to run on windows? Any hints as to how this might be possible, preferably without installing any unix tools, would be greatly appreciated!

edit: maybe something with FileSystemWatcher? would that work well running in the background in asp.net mvc? also, that would only tell me when a file changes, what would be an ideal API to use to only get the "new" data?

share|improve this question
    
Do you have no other alternative than to monitor some log file for changes? FileSystemWatcher would be the way to do that, though it would be very clunky. –  Robert Harvey Jul 29 at 19:19
    
I have a long running process on the server that I'd like to keep an eye on from time to time. It's a chatty log, which is very helpful for finding issues if/when they happen. –  Joel Martinez Jul 29 at 19:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.