PRB: Cannot Open File Unknown Using Access

Last reviewed: December 11, 1997
Article ID: Q166029
The information in this article applies to:
  • Active Server Pages 1.0

SYMPTOMS

When using Active Server Pages to query an Access database, you may encounter the following error message.

   Microsoft OLE DB Provider for ODBC Drivers error '80004005'

   [Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database
   engine cannot open the file '(unknown)'. It is already opened
   exclusively by another user, or you need permission to view its data.

   /scripts/somefile.asp, line x

CAUSE

This Error message can be caused by any of the following conditions:

  1. The Access .mdb file is located on another machine than the IIS Server.

    -and-

    IIS Server is configured to use NT Challenge / Response when accessing secured script files.

  2. The Access .mdb file is located on another machine than the machine running IIS.

    -and-

    IIS is configured to use the IUSR_computername account for anonymous access.

    -and-

    The script file being access is not secured and permits anonymous access.

    -and-

    The IUSR_computername is a local account and the same account/password does not exist on the remote machine

  3. The Access .mdb file is located on another machine than the machine running IIS.

    -and-

    IIS is configured to use Basic (Clear Text) authentication when accessing secured script files.

  4. The Access .mdb file is located on the same machine as the Web server.

    -and-

    The datasource uses a UNC path to point to the .mdb file (e.g. DSN=\\servername\share).

    -and-

    NT Challenge/Response is used to authenticate the user.

RESOLUTION

A possible workaround for this issue is to move the .mdb file to the server running IIS.

If it is not possible to move the .mdb file locally, the following workarounds can be used to address the causes above:

Use Basic Authentication instead of NT Challenge response when accessing secured scripts that query .mdb files located on another server. You can do this with the following:

  • Create another IUSR_computername account with the same password on the remote machine containing the .mdb file or specify DOMAIN\IUSR_computername for anonymous logon to IIS.
  • Grant access to the .mdb file or share for the authenticated user.

MORE INFORMATION

When using NT Challenge / Response with IIS, the users credentials are created at the browser. The credentials are then sent to IIS. IIS cannot forward those credentials on to another server.

The connection is attempted, but there is no username specified when connecting to the remote machine, so the connection fails.

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q174811
   TITLE     : FILE: Authentication and Security for Internet Developers

Keywords          : AXSFConfig kbsetup kbtshoot
Version           : 3.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.