Results 1 to 7 of 7

Thread: process cannot access file... (Resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    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:
    1. ' FileName is set to one of the files in that dir...
    2. Dim fs As New FileStream(Path.Combine("C:\WINDOWS\system32\Logfiles\W3SVC1", FileName), FileMode.Open)
    3. Dim sr As New StreamReader(fs)

    So, how can I read the log file ?
    Last edited by CVMichael; May 3rd, 2003 at 03:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width