Could not use ''; file already in use.

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.
 
J

Jacob Yang [MSFT]

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.
 
M

M K

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.
 
M

M K

BTW, FileMon tells me there is a Sharing Violation when this happens, on an
Open Access: All
 
G

George Ter-Saakov

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.
 
M

M K

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.
 
J

Jacob Yang [MSFT]

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.
 
M

M K

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.
 
J

Jacob Yang [MSFT]

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.
 
M

M K

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.
 
J

Jacob Yang [MSFT]

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.
 
Joined
Apr 9, 2008
Messages
1
Reaction score
0
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.

Follow these steps to resolve this issue:
1. Use Windows Explorer to find the folder on the disk, which contains the database file (.mdb). This is usually your project folder.
2. Right-click on the project folder and select Properties.
3. Uncheck the Read-only property.
4. Click on the Security tab in the properties window.
(Attention: If you don't see such tab (Windows XP), close the properties window, open any folder, select Tools -> Folder Options -> View, and uncheck the option Use simple file sharing.)
5. Click Add and find, then select the user IUSR_<COMPUTERNAME>.
6. Select the Write checkbox in the Allow; column to assign Write permissions to the IUSR account.

If these steps help you out in repairing your database then its good otherwise you need access repair software to repair your database.

Download trial version of a access recovery software from here : http://www.repair-access-file.com/access-mdb-recovery.php

Scan your database and if you are able to view your database in preview mode then buy full version and save your database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top