Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

With Vb.Net 2005 how can I determine which process System.IO.IOException: The process cannot access the file

I'm getting the following error.

System.IO.IOException: The process cannot access the file

I can't determine which process is accessing the file.

Is there some vb.net 2005 code which I can use to determine which it is  and more details ?
0
mindwarpltd
Asked:
mindwarpltd
  • 2
1 Solution
 
rockiroadsCommented:
Assuming you have access to the code -

Have you anything in your code that accesses a file? maybe look for a variable defined as FileStream or something. Maybe even a streamreader or streamwriter or binaryreader etc

Maybe check for System.IO namespace in your code i.e. look for   Imports System.IO
0
 
mindwarpltdAuthor Commented:
Plenty, however, it code also be my virus scanner as my program searches through a lot of urls which can be suspect.
0
 
rockiroadsCommented:
can u always reproduce this error in a certain scenario? maybe step thru the code (debugging) to find out where exactly the problem is.

Perhaps put try/catch around the code in order to catch these exceptions and display a message unique to that method. Maybe dump the stack trace to help out - something like

Catch ex As Exception
    MsgBox(ex.StackTrace)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now