process cannot access file... (Resolved)
I'm trying to make a program that reads the IIS log files and parses it (takes away the code red virus requests)
Everything works fine when I open a log from yesurday on, but with today's log I get this error:
The process cannot access the file "C:\WINDOWS\system32\Logfiles\W3SVC1\in030430.log" because it is being used by another process.
This is how I open the log file
VB Code:
' FileName is set to one of the files in that dir...
Dim fs As New FileStream(Path.Combine("C:\WINDOWS\system32\Logfiles\W3SVC1", FileName), FileMode.Open)
Dim sr As New StreamReader(fs)
So, how can I read the log file ?