Could not use ''; file already in use.

  • Thread starter Thread starter M K
  • Start date Start date
M

M K

I get the message: 'Could not use ''; file already in use.' on my pages if I
am working in the database. I used to be able work in the database (Access)
and users use the site, but I tried to install Remote Debugging tools from
VStudio 2k3 and since then it has been messed up.

Please, this is very important for us to fix. We are having errors if two or
more people are on the site at the same time.
 
Hi Mark,

This error usually happens on Windows NT, Windows 2000 or Windows XP and
may be caused by any of the following conditions:

- the database file or database folder doesn't have necessary security
permissions to write to, or erase an .ldb file created by Microsoft Access
when opening the database
- the database file doesn't have sufficient security permissions or write
permissions to be modified when updating data in it. The web browser is
seen by the web server as an Internet User (IUSR or ASPNET account. It
depends on the configurations of the web application). This user needs to
have write permission to the database file and to the database folder.

For the possible solution, please check the following URL:

http://support.codecharge.com/kb_article.asp?article_id=4

If the problem still exists, there is a tool that can allow you to identify
any specific files or folders that are giving an access denied. The tool is
called FileMon.

http://www.sysinternals.com/ntw2k/source/filemon.shtml

Filemon is simple to use and will show file accesses of all kinds. Try to
reproduce the error while capturing the events and hopefully find some
"access denied" messages in the logs.

Note:
The third-party products that are discussed in this article are
manufactured by companies that are independent of Microsoft. Microsoft
makes no warranty, implied or otherwise, regarding the performance or
reliability of these products.

I hope it helps.

Best regards

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thank you. This does not happen all the time. For the most part, this web
application can access the database. It is only when there are 2 or more
requests for access to the database that I recieve this error. But this has
not always been the case. I do believe it is a security issue, but it seems
that everything has the correct security. The database is simply not
allowing concurrent access.
 
BTW, FileMon tells me there is a Sharing Violation when this happens, on an
Open Access: All
 
Are you sure that ASP.NET account has "Create File" permission on folder
where database(mdb file) is?

It's important because otherwise the ldb file can not be created. And
database is open in exclusive mode by first connection?


George.
 
Yes, it has create rights. It can create the LDB, but I believe it is
opening it in exclusive mode. My connection string hasn't changed tho.
 
Hi Mark,

I am sorry if there is any misunderstanding but you have mentioned that
"The database is simply not allowing concurrent access".

As I understand, it means that "The ACCESS DB was configured not to be
allowed concurrent access". Is it correct?

If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
The database was working fine until I tried to install Visual Studio Remote
Debugging tools (2003) on that system. After that I started getting these
messages. I don't know what was configured differently, VS Remote Debugging
just went through and started changing permissions. And when I uninstalled,
not everything was fixed. So now I have my Access DB problem. So yes, I
guess (because I don't know) that access DB was configured not to be allowed
concurrent access.
 
Hi Mark,

I agreed that it should be a security issue. Have you tried the fix steps
listed in the following article?

http://support.codecharge.com/kb_article.asp?article_id=4

1. Check with the host that the user running the ASP.NET web app, usually
it is ASPNET account, has the correct permissions on the database and the
folder containing the database.
2. Try to open the MDB file in Access and choose compact and repair from
the tools menu.
3. Please make sure in the asp.net code, the connection to the MDB file was
closed each time we finished the operations on the db file.

Please help to double check the steps above. I certainly appreciate your
time.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Yes, the security is still correct. (Both ASP.NET and IUSR have Modify and
Write rights to the folder, the file, and the temp folder.) It is not just
my ASP.NET app. It affects all users on our network as well. Only one user
can access it at a time. I tried compacting the database, and get this
message now:
The Microsoft Jet database engine cannot open the file
'C:\inetpub\CCLWeb\databases\webForm.mdb'. It is already opened exclusively
by another user, or you need permission to view its data.
 
Hi Mark,

Thank you for your update. More information is needed before my further
research.

1. How do you open the access database? Would you please show the code for
opening the access database? Based on the error message, the mdb file is
already opened exclusively.

2. When you tried to compact the database, does the database file was
already opened by other users? Please make sure that all other users have
logged out and test it again.

3. Please tell me the version of your access database.

4. Does the problem only occur in this specific database? Have you tried to
test some default access database files?

I certainly appreciate your time.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top