How to authenticate ASPNET against an Access database?
Posted on 2010-11-18
I’ve created a website using Visual Studio 2005 on my XP-PC and using a local Access 2003 database, it works fine. I moved the database to a server and changed the database reference to: \\server_name\database_name and I’m getting the infamous error:
The Microsoft Jet database engine cannot open the file '\\server\databasename. It is already opened exclusively by another user, or you need permission to view its data.
Having just created it and without Access open against it (no .ldb file present), I’m convinced it isn’t an exclusive issue. I believe it to be a simple permission issue. My event log records an error (eventid: 1309):
Process ID: 4980
Process name: aspnet_wp.exe
Account name: CANADA\ASPNET
(where Canada is my machine name)
I thought it would be necessary to change the anonymous access account (in IIS 5.1) but playing around with that hasn’t helped at all; the errors in the event log continue to show the account name listed above even after restarting the website. I’m trying to find out where the connection string is stored so that perhaps, I can make it use a “valid” account. I’m using IE 8 from my XP-PC and looking for a solution. Can anyone help? Thank you!
BTW, this tiny application will be used by 1 or 2 PCs internally and it merely displays information from a table (no updates, inserts, deletes, etc.).