You see this error message either onscreen or in the Event Viewer when running your application:
Unable to connect to database. The Microsoft Jet database engine cannot open the file 'C:\MyApp\YourDatabaseName.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
This error occurs when you are using Microsoft Access as your application’s database. There are a variety of causes for this error.
This Microsoft Knowledge Base article discusses one possible cause: The ASP.NET worker process runs under the default ASPNET account. If you do not enable impersonation for an application, all of the threads that run the requests for that application run under the process account.
http://support.microsoft.com/default.aspx?scid=kb;en-us;316675
This article suggests several solutions:
Configure the ASP.NET worker process to run under the SYSTEM account in the <processModel> section of the Machine.config file.
For security reasons, Microsoft recommends that you enable impersonation on your ASP.NET application. This method works if the impersonated user has necessary permissions to the computer and the database that you are accessing. See Cannot Connect to Your Database.
Grant read and write permissions for the "Everyone" group on the database and the database folder. This method is not safe; therefore, Microsoft does not recommend this method.
This is perhaps the most common cause of problems with Microsoft Access databases.
This is a restriction of the Microsoft JET driver and not of Iron Speed Designer.
The MDB file may be located in any folder on the local drive, but the folder must have Read/Write permission for the ASPNET user. Go to Windows Explorer and add the ASPNET user to have Full permissions on the folder containing the MDB file.
Relative paths in the Web.config file are supported starting with Version 2.1.2 of Iron Speed Designer.
Make sure the ASPNET user account has full read and write permissions to your system’s Temp folders, such as:
C:\Documents and Settings\ASPNET\Local Settings\Temp
C:\Windows\Temp
Step 1: Review your system’s Environment Variables under the target System properties to see where the Temp folders are located. Please note that the Local Settings folder may be hidden and you may need to enable it for viewing.
Step 2: Make sure the ASPNET user has full read and write permissions to those folders.
Application Runs But No Data is Displayed
Part VII: Troubleshooting Applications
Application Runs But No Data is Displayed