Question:
IIS Problem (remote Access DB & asp)?
anonymous
2009-02-09 10:03:37 UTC
Whenever I try to connect to an access database, I am receiving this error "The Microsoft Jet database engine cannot open the file '\\servername\mydb.mdb'. It is already opened exclusively by another user, or you need permission to view its data."

I can fix this problem if I enable anonymous users. This would be fine, but if I do this, I cant retrieve the session variable LOGON_USER. I have to be able to pull the username for a project.

I have given everybody rights to the database and to the asp pages, and I still get the error. I'm about out of ideas. Putting the DB on the web server is not an option. Both servers are running 2003.

Any ideas?
Three answers:
Kishore
2009-02-09 10:11:26 UTC
There are several causes for this error message:



The account that Microsoft Internet Information Server (IIS) is using (which is usually IUSR) does not have the correct Windows NT permissions for a file-based database or for the folder that contains the file.



The file and the data source name are marked as Exclusive.



Another process or user has the Access database open.

The error may be caused by a delegation issue. Check the authentication method (Basic versus NTLM), if any. If the connection string uses the Universal Naming Convention (UNC), try to use Basic authentication or an absolute path such as C:\Mydata\Data.mdb. This problem can occur even if the UNC points to a resource that is local to the IIS computer.



This error may also occur when you access a local Microsoft Access database that is linked to a table where the table is in an Access database on a network server.
Rodney K
2009-02-09 10:14:23 UTC
The reason is because of the user context under which IIS is running your web page. If you are using ASP.Net, you can set which user context is used in the 'identity' configuration entry in your web.config file to assign a network user to use for that context. The computer is currently trying to access the other server as the IIS user instead of a network validated user. If you have the same user name on both servers, it is possible to work around this, but it is best to use a domain user as the account for identification and validation.



It is just like if you are logging onto a share yourself, if the user you are logged in with on your system does not have access on that other system, then the connection will be refused.



If you are not using ASP.Net, you will need to use a network security object to assign the user with which to attach to the network share.
?
2016-05-23 14:32:56 UTC
Enclosing quotes are not an issue. Check with debugger what value is in "id" variable (& id &). I suppose it is not integer.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...