Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 207525 - Last Review: December 3, 2003 - Revision: 3.1
PRB: IIS4: ASP/ADO Do Not Work Across UNC Path
This article was previously published under Q207525
Active Server Pages (ASP) and ActiveX Data Objects (ADO)
cannot access a Microsoft Access database across a universal naming convention (UNC) Path. The following error message is generated:
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/default.asp, line 11
Internet Information Server (IIS) is not passing valid credentials to the share. This behavior could occur because:
- The Web page's authenticated user, often the IUSR_Servername account, is not a valid account on the computer that is hosting the database file.
-or-
- IIS is passing a secondary token for the account that does not have permission to access the file.
Resolution 1:This is more of an example of how to set this up assuming the following conditions:
Webserver name: Server1
Database resides on the following share: \\Server2\Sharefolder\db.mdb
ConnectionString used:
Set CN=Server.CreateObject("ADODB.Connection")
CN.Open "DBQ=\\Server2\Sharefolder\db.mdb"
- On both Server1 and Server2, create an Microsoft Windows NT account named Server1Guest and give it the
same password.* See NOTE.
- On Server2, make sure that this account has sufficient privileges to access the database.
- Open the Microsoft Management Console (MMC) on Server1. Drill down to your application, right-click on it, and then click to open Properties.
- On the Security tab, make sure that the Allow Anonymous option is enabled.
Click the Edit button for this option twice so that you are viewing
the Account. It will usually be "IUSR_Server1."
- Deselect Enable Password Synchronization,
and change the user and password to Server1Guest and
whatever password that you
have chosen. DO NOT re-select Enable Password Synchronization.
-
Recycle the Web server. On the Start menu, select Run, and then type:
net stop iisadmin /y
net start W3SVC
-
On Server1 in NT Explorer, make sure that Server1Guest has permissions to
Inetpub/wwwroot/AppName
and its subdirectories.
*NOTE: This can be any valid NT Username, and you may leave it as IUSR_Server1. You must change the password and make sure that the Username and the password are EXACTLY the same in IIS on Server1, and in the User Manager for Domains in both Server1 and Server2.
Resolution 2.- Map a drive (x:) to the share and have it connect as someuser.
- Create your ODBC connection to the mapped drive (x:\directory\database.mdb).
- Set the virtual directory that the ASP is running under to: Run in separate memory space.
- Create an IWAM_<computer name> account on the share computer and give it a password.
- Grant that user the appropriate rights to the files and directory.
- Synchronize the password that you assigned to the IWAM account on the ShareComputer with the IISComputer.
- On the IISComputer, open the Internet Service Manager and expand the Microsoft Transaction Server folder until you reach the Packages Installed folder.
- Highlight the following package name: IIS - {<Web site name>//Root/<virtual directory name>}, and choose Properties.
- Click on the Identity tab and type in the password that you used for the IWAM_<computer name> account.
- Stop and restart the Virtual Web site.
When you run a virtual directory in its own memory space, it runs as the IWAM_<computer name> account. However, during the installation of IIS, that account never gets a password. When you create the account for the share computer, you must give it a password and synchronize the account passwords with the IISComputer. The only step that is missing is the specification of the the account password for the package that IIS creates.
WORKAROUND
For additional information about a workaround, click the article number below
to view the article in the Microsoft Knowledge Base:
178215Â
(http://kbalertz.com/Feedback.aspx?kbNumber=178215/EN-US/
)
HOWTO: Configure Visual InterDev to Work with an Authenticated Web Project
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
166029Â
(http://kbalertz.com/Feedback.aspx?kbNumber=166029/EN-US/
)
PRB: Cannot Open File Unknown Using Access
234205Â
(http://kbalertz.com/Feedback.aspx?kbNumber=234205/EN-US/
)
PRB: File '(unknown)', Exception Occurred, or No Data Using Recordset DTCs
APPLIES TO
- Microsoft Internet Information Server 4.0
- Microsoft Active Server Pages 4.0
- Microsoft ActiveX Data Objects 1.5
- Microsoft ActiveX Data Objects 2.0
- Microsoft ActiveX Data Objects 2.01
- Microsoft ActiveX Data Objects 2.1
- Microsoft ActiveX Data Objects 2.1 Service Pack 1
- Microsoft ActiveX Data Objects 2.1 Service Pack 2
| kbdatabase kbjet kbpending kbprb KB207525 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate