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
300 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now