Solved

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

Posted on 2010-09-12
3
304 Views
Last Modified: 2012-05-10
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
Comment
Question by:mindwarpltd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 33657757
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
 

Author Comment

by:mindwarpltd
ID: 33657776
Plenty, however, it code also be my virus scanner as my program searches through a lot of urls which can be suspect.
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 33657832
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question