Has anyone seen asp.net code to read the logfiles of an IIS server? I have seen lots for just asp (http://www.devarticles.com/content.p...leId=33&page=3)
but I don't know how to convert this into asp.net, any ideas?
Printable View
Has anyone seen asp.net code to read the logfiles of an IIS server? I have seen lots for just asp (http://www.devarticles.com/content.p...leId=33&page=3)
but I don't know how to convert this into asp.net, any ideas?
it is actually so much easier in asp net
Just change the part that says Application to whatever log you want(Application, Security, System)Code:Dim log As New System.Diagnostics.EventLog()
Dim logentry As System.Diagnostics.EventLogEntry
log.Log="Application"
For Each logentry in log.Entries
MessageBox.Show(logentry.Message)
Next logentry
And change the the MessageBox.Show to output logentry.Message to either some asp .net labels or list box, or something else you wish.
There are some other log data you can output but you have to look those up. If you have Visual Studio .NET, just use the intellisense for logentry. and see what other properties it has.