Could not use ''; file already in use.

Discussion in 'ASP .Net' started by M K, Nov 6, 2003.

  1. M K

    M K Guest

    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.
     
    M K, Nov 6, 2003
    #1
    1. Advertising

  2. 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.
     
    Jacob Yang [MSFT], Nov 7, 2003
    #2
    1. Advertising

  3. M K

    M K Guest

    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.

    "Jacob Yang [MSFT]" <> wrote in message
    news:...
    > 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 K, Nov 7, 2003
    #3
  4. M K

    M K Guest

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

    "Jacob Yang [MSFT]" <> wrote in message
    news:...
    > 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 K, Nov 7, 2003
    #4
  5. 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 K" <> wrote in message
    news:...
    > 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.
    >
    > "Jacob Yang [MSFT]" <> wrote in message
    > news:...
    > > 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.
    > >

    >
    >
     
    George Ter-Saakov, Nov 7, 2003
    #5
  6. M K

    M K Guest

    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.

    "George Ter-Saakov" <> wrote in message
    news:OOAKR%...
    > 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 K" <> wrote in message
    > news:...
    > > 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.
    > >
    > > "Jacob Yang [MSFT]" <> wrote in message
    > > news:...
    > > > 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 K, Nov 7, 2003
    #6
  7. 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.
     
    Jacob Yang [MSFT], Nov 10, 2003
    #7
  8. M K

    M K Guest

    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.


    "Jacob Yang [MSFT]" <> wrote in message
    news:...
    > 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 K, Nov 10, 2003
    #8
  9. 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.
     
    Jacob Yang [MSFT], Nov 11, 2003
    #9
  10. M K

    M K Guest

    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.


    "Jacob Yang [MSFT]" <> wrote in message
    news:...
    > 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 K, Nov 11, 2003
    #10
  11. 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.
     
    Jacob Yang [MSFT], Nov 12, 2003
    #11
  12. M K

    woods_jemmy

    Joined:
    Apr 9, 2008
    Messages:
    1
    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.
     
    woods_jemmy, Apr 9, 2008
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roxanne
    Replies:
    0
    Views:
    1,252
    Roxanne
    Jul 4, 2003
  2. =?Utf-8?B?TWlybw==?=

    Could not use ''; file already in use

    =?Utf-8?B?TWlybw==?=, Sep 27, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    22,729
    gopijoshi
    May 24, 2009
  3. Adam Knight
    Replies:
    1
    Views:
    1,142
    Ken Cox - Microsoft MVP
    Dec 5, 2005
  4. Learner
    Replies:
    6
    Views:
    4,352
    =?Utf-8?B?U2hlaGFiIEthbWFs?=
    Feb 16, 2006
  5. Jeff Rohrer
    Replies:
    6
    Views:
    133
    Phrogz
    Sep 4, 2006
Loading...

Share This Page