ASP.NET & Access database

M

MW de Jager

I'm having endless problems with gaining access to an Access Database that
sits on a different server. My ASP.NET app cannot gain control. The errror
message I get is:

The Microsoft Jet database engine cannot open the file
'\\Server1\DataFolder\Countries5.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.

I have setup the connection string to have the username = admin and the
password is blank. At design time I can see the data no problem, yet as
soon as the ASP.NET app is running, I get the above error.

Any ideas anyone?

Regards
MW
 
J

Juan T. Llibre

MW,

There's two types of permissions needed in order to be
able to access data in a database in an external server:

1. database permissions
2. file permissions

re:
I have setup the connection string to have the username = admin

That corresponds to the database permission and is fine that way.

You also need to allow file permission access to
the account under which ASP.NET is running.

i.e.,
your ASP.NET account must have permission to access \\Server1\DataFolder\

Notice that you need read/write permissions assigned for the full folder,
and not just for the database file.
 
M

MW de Jager

Ok, it's working now. If I open my website on my app server, on which the
access database is, it works fine. If I however run the app local with the
access data on the server (like when you are still coding), then my problems
return with a vengeance.

If I use impersonation with usename="NT AUTHORITY\NETWORK SERVICE" it still
runs ok until I try to open the page that requests the access database. The
above username is what is being used when I run it on the server with no
problems.

Any ideas as to which user name to use or is my problem elsewhere?

Regards
MW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top