I was hoping someone could offer me a bit of help here. I am trying to
connect to an unpassworded Access 2007 database for use in a small website.
For testing purposes I have everything stored locally, and am using the
following connection string:
ConnectString = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=E:\myWebs\htdocs\grahams\data\products.accdb;Persist Security
Info=False;"
All I get when I try to open the website is this:
Microsoft Office Access Database Engine error '80004005'
Unspecified error
/grahams/connection.asp, line 14
the connection.asp file is just this:
Dim conn, ConnectString
ConnectString = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=E:\myWebs\htdocs\grahams\data\products.accdb;Persist Security
Info=False;"
Set conn = Server.CreateObject("ADODB.Connection")
response.Write(ConnectString)
conn.open ConnectString
I have tried every combination of file name, and tried to use
server.mappath but I get the same error no matter what.
Bob Barrows [MVP] - 25 Feb 2008 21:31 GMT
The connection string looks correct.
Is that E drive accessible to the user account under whose context the
IIS process is running (if your website has Anonymous enabled, that will
usually be the IUSR_MACHINENAME account)? Does that account have Modify
permissions for the folder contining the database file?
> I was hoping someone could offer me a bit of help here. I am trying to
> connect to an unpassworded Access 2007 database for use in a small
[quoted text clipped - 27 lines]
> I have tried every combination of file name, and tried to use
> server.mappath but I get the same error no matter what.

Signature
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Hakk - 25 Feb 2008 23:03 GMT
> The connection string looks correct.
> Is that E drive accessible to the user account under whose context the
> IIS process is running (if your website has Anonymous enabled, that will
> usually be the IUSR_MACHINENAME account)? Does that account have Modify
> permissions for the folder contining the database file?
Ok, I think I've followed you there. I have looked at and added the IUSR
to the permitted list for the folder containing the db and the db file
itself. Has no effect. Anything else I can try?
Bob Barrows [MVP] - 26 Feb 2008 00:13 GMT
>> The connection string looks correct.
>> Is that E drive accessible to the user account under whose context
[quoted text clipped - 5 lines]
> IUSR to the permitted list for the folder containing the db and the
> db file itself. Has no effect. Anything else I can try?
Sorry, I don't have Access 2007 so I can't try anything myself. You might
try posting to one of the Access newsgroups if you get no replies here.

Signature
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Adrienne Boswell - 26 Feb 2008 15:34 GMT
>> The connection string looks correct.
>> Is that E drive accessible to the user account under whose context the
[quoted text clipped - 5 lines]
> to the permitted list for the folder containing the db and the db file
> itself. Has no effect. Anything else I can try?
Make sure the IUSR also has write permissions to the temp directory.

Signature
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Bob Barrows [MVP] - 26 Feb 2008 15:47 GMT
>>> The connection string looks correct.
>>> Is that E drive accessible to the user account under whose context
[quoted text clipped - 8 lines]
>
> Make sure the IUSR also has write permissions to the temp directory.
Really? is this a new requirement for A2007? I know it was an issue for
ODBC, but I've created many working asp pages using pre-A2007 databases
without worrying about temp directory permissions.

Signature
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Hakk - 26 Feb 2008 18:09 GMT
>>> The connection string looks correct.
>>> Is that E drive accessible to the user account under whose context the
[quoted text clipped - 7 lines]
>
> Make sure the IUSR also has write permissions to the temp directory.
Yeah, done that too - same error message.
Starting to get frustrated now :(
Bob Barrows [MVP] - 26 Feb 2008 18:37 GMT
>>>> The connection string looks correct.
>>>> Is that E drive accessible to the user account under whose context
[quoted text clipped - 11 lines]
> Yeah, done that too - same error message.
> Starting to get frustrated now :(
One way to determine if it's a permissions problem is to put your code
into a .vbs file (minus all references to ASP objects: server, response,
request) and see it you have the same problem executing the vbs file.

Signature
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Hakk - 26 Feb 2008 18:53 GMT
>>>>> The connection string looks correct.
>>>>> Is that E drive accessible to the user account under whose context
[quoted text clipped - 14 lines]
> into a .vbs file (minus all references to ASP objects: server, response,
> request) and see it you have the same problem executing the vbs file.
The error occurs on the "conn.open ConnectString" line in a subroutine
with no server objects. Just to test it, I put in a respons.write() line
in and the connection string is output to the browser before I get the
error message:
Dim conn, ConnectString
ConnectString = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=E:\myWebs\htdocs\grahams\data\products.accdb;Persist Security
Info=False;"
Set conn = Server.CreateObject("ADODB.Connection")
response.Write(ConnectString)
conn.open ConnectString ' <============= ERROR ON THIS LINE
Pete - 14 Apr 2008 16:48 GMT
So I'm running this setup on Vista IIS7 with an Access 2007 database. What I have found is you have to give permissions on C:\Windows\Temp for IUSR. Since I'm just testing, I just give Everyone Modify access to the temp directory. However, after about 1 day, the permissions seem to change back and my Everyone was removed. So I added it back in today, we will see if it will change again.
I wouldn't be surprised if MS adjusted the permissions intentionally for security reasons.
Hakk - 26 Feb 2008 19:11 GMT
> I was hoping someone could offer me a bit of help here. I am trying to
> connect to an unpassworded Access 2007 database for use in a small website.
[quoted text clipped - 26 lines]
> I have tried every combination of file name, and tried to use
> server.mappath but I get the same error no matter what.
ok, found a workaround. I'm not impressed with it, but it worked.
From kb/926939
"WORKAROUND
To resolve this problem, use the method that is described in the
"Resolution" section. However, if you do not want to add access control
entries to the temporary directory for the process identity, you can
work around the problem by disabling the loadUserProfile property for
the application pool. When this property is disabled, IIS 7.0 does not
load the current user profile for the application pool.
Important If you disable this property, a security risk may be created.
Make sure that you understand and evaluate the risks before you
implement this workaround.
To disable the loadUserProfile property for the application pool, modify
the ApplicationHost.config file. The following example demonstrates how
to do this.
<applicationPoolDefaults>
<processModel identityType="NetworkService" loadUserProfile="false" />
</applicationPoolDefaults> "