Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2007 opening exclusively by IIS.  Only able to open it readonly read only

Posted on 2009-05-10
5
Medium Priority
?
321 Views
Last Modified: 2012-05-06
I am running a small ASP.Net application on a windows 2003 server running IIS.  

On my development machine (Vista Business) I used to develop the application I am able to simultaneously access the DB via both the ASP.Net web application hosted by the ASP.Net Development Server and MS Access.  So I am able to change values in the DB using access and see the change reflected on the web site.

When I deploy the application to the 2003 server it seems IIS opens the DB exclusively.  If I am running the web application then if I try to open the DB with MS Access I get message that the DB is opened in read only mode.

If I first open the DB in MS Access and then try and and use my web application I get the following error message from ASP.Net: Could not use 'C:\Inetpub\wwwroot\bbcintllc\WWD\App_Data\BBC_WWD.accdb'; file already in use.

Is there a configuration option to get IIS to open Access in a non-exclusive mode?  The connection string I am using is as follows:
<add name="WWWD_Access" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Inetpub\wwwroot\bbcintllc\WWD\App_Data\BBC_WWD.accdb"
            providerName="System.Data.OleDb" />

Open in new window

0
Comment
Question by:canuckconsulting
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Korbus
ID: 24350387
Just a short in the dark here:
Create an ODBC connection of your IIS server, and connect via that, rather than directly tothe file.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 24350569
This sounds a lot like permissions issues. Are you sure that you've properly set the permissions on the Server to allow your ASP users at least Modify permissions on the server, along with whatever other users need this permission?
0
 

Author Comment

by:canuckconsulting
ID: 24352323
LSMConsulting

If I only connect one way or the other it works fine.  That is I am able to modify etc if I connect with just Access and similarly I have full control if I connect with just the web.  Could it still be a permissions issue if I have full control if I connect using just one of the tools?

Korbus:

I would like to avoid this if I could only because I would, I think, change all my oledb code to odbc.  Am I correct on this?
0
 
LVL 85
ID: 24353103
Yes, it could still be permissions. Access (actually, you're working with a Jet database) creates a lockfile when you open it; generally it will create that lockfile in the same folder as the database, but if you don't have sufficient permissions on that folder, the lockfile will be created somewhere else (generally on the workstation requesting the database). If this happens, other users either (a) wouldn't be able to open the db or (b) could open it readonly.
0
 

Author Comment

by:canuckconsulting
ID: 24358668
I made the anonymous user out to be an administrator but no luck.  I then went an extra step and did a search for the lock file and it was nowhere on the server.  I have tested and when you open a db exclusively no lock file is created so I am assuming that IIS is opening the DB exclusively.  

Any thoughts on how to talk it into being more friendly and share the db?
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question