Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
309 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 2000 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

916 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