"System.Data.OleDb.OleDbException" error when you run an ASP.NET Web application (825738)
The information in this article applies to:
- Microsoft .NET Framework 1.0
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft Access 2000
- Microsoft Access 2002
- Microsoft Office Access 2003
SYMPTOMSWhen you connect to a Microsoft Access database from a Microsoft ASP.NET
application, you receive the following error message: System.Data.OleDb.OleDbException: Unspecified
error CAUSEThe ASP.NET Web application that has the impersonation element set to
true in the Web.config file, and that has the authentication element set to
Windows in the Web.config file, runs under the
impersonated account. The code in the ASP.NET Web application connects to
an Access database. When the connection is made, the Microsoft Jet OLE DB
creates temporary files in the Temp folder in the following directory:
Document and Settings\ServerName\ASPNET\Local
settings where ServerName is the name of your server. If the impersonated user account does not have read/write
permissions enabled in the Temp folder, you receive the error message that is mentioned in the "Symptoms" section. RESOLUTIONTo resolve this problem, enable read/write permissions
for the impersonated user account in the Temp folder. To do this, follow these steps:
- In Windows Explorer, locate the following folder:
Document
settings\ServerName\ASPNET\Local
settings\Temp where ServerName is the name of your server. - Right-click the Temp folder, and then
click Properties.
- In the Properties dialog box, click the
Security tab.
- On the Security tab, click
Add,
and then type ServerName\UserAccount
in the Select Users or Groups text box, where
ServerName is the name of your server, and where UserAccount is the name of the impersonated account. Click
OK.
- Click to select the Read and
the Write check boxes, and then click
OK.
STATUS This
behavior is by design.REFERENCESFor more information about ASP.NET impersonation, visit the
following Microsoft Developer Network (MSDN) Web site:
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
301195
How to configure security for files and folders on a network (domain) in Windows 2000
316675 Cannot connect to Access database from ASP.NET
Modification Type: | Major | Last Reviewed: | 4/19/2005 |
---|
Keywords: | kbprb kbConfig kbAuthentication kbWebForms kbDatabase KB825738 kbAudDeveloper kbAudEndUser |
---|
|