Solved

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

Posted on 2009-05-10
5
306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

624 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