read microsoft access file on windows server 2003

G

Guest

Hi:
I'm having problems reading a Microsoft Access file from my ASP.Net app on a
Windows Server 2003 machine. The error message:
The Microsoft database engine cannot open the file, <my_file>. It is
already opened exclusively by another user, or you need permission to view
its data.

I've read some info about this (microsoft support article q316675) but I'm
still confused on what to do?
 
K

Kevin Spencer

Is the file opened in Access when you are trying to open the database? Is
there a .ldb file in the same folder as the database file? What provider are
you using to connect to the database?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 
G

Guest

There's not an .ldb file (lock file). thats not it. I'm using
Microsoft.Jet.OLEDB.4.0.

Key things here. It works on my machine running Win2000 with IIS.
It doesnt work on Win2003 Server running IIS. I know the issue is specific
to IIS on Win2003 Server.

Also, I added to the web.config file:
<identity impersonate="true"/> between the <system.web>
that didnt fix it.
Karen
 
G

Guest

OK. so in the end, adding the <identity impersonate="true"/> to the
web.config for the application fixed the problem. IIS had to be completely
restarted afterwards.
Karen
 
K

Kevin Spencer

Hi Karen,
Key things here. It works on my machine running Win2000 with IIS.
It doesnt work on Win2003 Server running IIS. I know the issue is specific
to IIS on Win2003 Server.

Actually, it has nothing to do with IIS, and everything to do with Windows
2003 Server. The necessary permission is not a web server virtual directory
permission, but a file system permission. The user account under which
ASP.Net is running must have "read" (file) access to the folder.
Also, I added to the web.config file:
<identity impersonate="true"/> between the <system.web>
that didnt fix it.

Of course not. This is not all that is necessary in order to impersonate an
identity. It doesn't specify "who" to impersonate, nor does it supply their
credentials. You need something like:

<identity impersonate="true|false"
userName="domain\username"
password="password"/>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 

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,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top