473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

please help, The process cannot access the file...

I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think
I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #1
4 1868
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #2
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #3
That was exactly I did and it didn't work.

"Miha Markic" <miha at rthand com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not do nothing about it. Since I can open the log file in File explorer(when I tried to delete it, I got a file share violation, that is for sure), I

think
I could open and read the file in my project. Why I could not do that? any idea?
Thanks!


Nov 22 '05 #4
That was exactly I did and it didn't work.

"Miha Markic" <miha at rthand com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not do nothing about it. Since I can open the log file in File explorer(when I tried to delete it, I got a file share violation, that is for sure), I

think
I could open and read the file in my project. Why I could not do that? any idea?
Thanks!


Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: david | last post by:
I am calling a dll in my C# project, when I try to access its log file, I got error " The process cannot access the file "xxxxxxx" because it is being used by another process. ". I suspect the...
2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
1
by: =?Utf-8?B?UGllcnJl?= | last post by:
Hello, I have an simle application that uses a referenced library of my own. It's been a year now that I have no problems until a few days. Here is the details of my problem: The library...
5
by: Sam | last post by:
Hi, I have one table like : MyTable {field1, field2, startdate, enddate} I want to have the count of field1 between startdate and enddate, and the count of field2 where field2 = 1 between...
4
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End I generated local mode report but as there was no printing option available . I assign...
0
nightangel
by: nightangel | last post by:
Hi dude,what i was done in my application is uploading a image file to my server using FTP, it work great when pushing a file into the server path using FTP. The problem i met now is i need to do a...
2
by: JerryWEC | last post by:
I'm getting the following warnings related to UnmanagedRegistration.cache and ResolveAssemblyReference.cache and files being used by other process. I just can't find out why I'm getting these...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.