Solved

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

Posted on 2009-05-10
5
291 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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 84
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

726 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