Solved

Default web site seems to have an OLE DB permission problem

Posted on 2010-08-20
25
602 Views
Last Modified: 2012-05-10

Seems that this is a web site PERMISSION error somewhere pertaining to the MDB file located on the D drive, and I cannot find it.  

On Server this web site code WORKS fine if started in Visual Studio --- However….

On Server the code fails using http://Server IP address  or  http://localhost
On workstation code fails using http://Server IP address

Error Message, Number ->    Unspecified error, 5
Stack:    at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)

On Server IIS Virtual directory -> C:\Web_Ster  (this contains the compiled ASP.net code web site code)  IUSR_TED seems to have appropriate permissions here.

Uses “Anonymous Access”  and “Windows Authentication”
IUSR_TED  (seems to have appropriate permissions on MDB’s folder)

In IIS:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Ster\RMS\Data\rms1.mdb

In WebConfig:
<add name="RmsConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Ster\RMS\Data\rms1.mdb" providerName="System.Data.OleDb"/>

If you have any clues or suggestions where I should look, PLEASE let me know....

Thanks in advance...

0
Comment
Question by:FrankBabz
[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
  • 10
  • 8
  • 6
25 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33490245
Access MDB's need to have write permission enabled for the web user.
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33490471
What server is this running on?
I had a similar issue yesterday with an application that I just moved to Win 2008R2...it seems that Jet.OLEDB can't run in a 64-bit environment...
The work-around was to create a 32-bit application pool for it to run in...
Here's the article I read... http://learn.iis.net/page.aspx/563/using-classic-asp-with-microsoft-access-databases-on-iis-70-and-iis-75
Espavo
0
 

Author Comment

by:FrankBabz
ID: 33491562
Thanks for trying to help me.  I am really struggling with this for quite a while.

I do not know how to determine which account (IUSR, NETWORK SERVICE, SYSTEM etc) is having the problem, and I do not know how to determine which permission is needed.  Is there any kind of trace or log file that would help?  Also, I am unclear if a target folder has full permissions, does the parent folder(s) also have to have permissions?

I'm using Windows Server 2003 on an x32 computer. I am not at IIS7 level.  I assume it is an IUSR permission issue having to do with the MDB, and I think I have provided IUSR read/write/modify permissions to the target folder specifically and the D: drive in general. In IIS I do have Frontpage extensions enabled, and maybe I have an IIS issue, but don't know what to try.

All my web site code works great if run under/by Visual Studio on this server, and this leads me to believe it must be a permission issue.   In fact, when run localhost or IP all other web site features including SQLExpress and aspnetDB features work fine.  

My only problem is dealing with that MDB while running in localhost. (or IP) mode.   My web site code only reads from that MDB, but nonetheless I have granted write permissions to IUSR.

Is it possible there is some obscure Log file, or Temp file that needs permissions when the MDB is being opened/accessed?

Thanks for any clues......

0
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33492012
When I have used MDBs on my IIS server, I have always had to give the IUSR write permissions on the MDB file itself.  Folder permissions were not enough.  It appears that the Jet driver opens the file in read and write mode.
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33492030
So, a quick way to test, is to to give the "Everyone" user FULL ACCESS rights to the .mdb folder... that way you can easily discover if it is in fact a permissions issue...
Once you've determined that, you can find which user you actually need to assign the rights to.
Espavo
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33492102
The "EVERYONE" group only includes local logon users and the GUEST account.  It does not include the IUSR anonymous logon since Windows XP.
0
 

Author Comment

by:FrankBabz
ID: 33492147
Actually I have given the containing folder and, thru inheritance, the MDB full rights for IUSR and USERS.  This did not help.   Because the code works with Visual Studio, I feel this has to be a permission issue (most likely IUSR).   But, maybe IIS,  or ???

I guess I can open up the D: drive, and then even the C: drive to IUSR,  Then start tightening it all back down when it starts working.  How awful an approach that all seems. I had hoped there would be an intelligent means to trace and find which account and target is being denied.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33492260
By the way, MDBs are single user.  You can't have it open in Access and also get to it thru web access.  Access will lock or block the MDB.
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33492805
Whenever I've had issues like this, and I wasn't 100% sure if it was a "permissions" issue, I've given the folder "Everyone / Full Access"... It's either worked or it hasn't... (Generally it's worked...)
0
 

Author Comment

by:FrankBabz
ID: 33492875
Dave.. I am not sure what you mean.  Clearly an MDB is accessable in a multi-user manner unless someone has it opened for exclusive use.  I've done that for years.

Espavo.. I agree, but in this case I do not believe that the MDB's permissions are the problem.. Everyone did not fix my problem.  I'm guessing some process in establishing the connection needs something for which IUSR does not have permission.  Maybe????
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33492956
If you have an MDB open in Access, it locks the file so no one else can open it.  I know, I've accidentally done it too many times.  I'm not sure if the Jet driver does that but when you're accessing it from a web page, it opens and closes quickly so that you wouldn't notice.

And I looked at the permissions on my MDB files and I think you're right and I was wrong about that.  Just remembered, the place I had to set write permission was on the IIS web server.  Those permissions are Separate from what you see in Windows Explorer and I don't always remember that.  Default in IIS is for write permissions to be Off.  If this is a publicly available server, you want to make only the MDB file writeable.  You also want it in a non-public directory so it can't be downloaded also.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33492982
0
 

Author Comment

by:FrankBabz
ID: 33493565
Dave... I appreciate you sharing the links and concerns with using Access in a Web ap.  I am aware Access  should be avoided in a Web ap.  I am not using Access in my Web ap. All I am doing is opening a 3rd party created MDB.... using Jet to grab (read only) some data... and disconnecting.  

All my other web ap database work is done with SQL server, and that part is working fine (until I open that MDB, that is).
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33493594
Good, didn't mean to be obnoxious about it.  Did you take a look at IIS permissions for that file or folder?
0
 

Author Comment

by:FrankBabz
ID: 33493670
Dave...  My web site is in a folder on the C: drive and all IIS permissions there look OK
The MDB is in a folder on the D: drive and out of IIS pervue.  Excepting that IIS provides that IUSR is to used for anonymous access, and IUSR is fully permissioned to deal with the MDB.

It is time (I think) to look somewhere else.
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33494106
Just wondering... have you tried giving the folder "Everyone / Full" permissions to see if it works?
0
 

Author Comment

by:FrankBabz
ID: 33495460
Yes I did...  and it did not help.
Thanks for the suggestion....
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33495595
If THAT didn't work, then I don't think it's a permissions error...
(What makes you think it is?)
0
 

Author Comment

by:FrankBabz
ID: 33495630
When I run this code under Visual Studio it works fine.
Thanks for trying...
0
 

Author Comment

by:FrankBabz
ID: 33504470
Here is perhaps an incomplete, but very satisfying conclusion...
FYI....search: "ASP.NET Required Access Control Lists (ACLs)"

In the chart refer to row 4 where it advises:
%SystemRoot%\Temp requires "read/write/delete"  access.

I applied these permissions to the temp folder for IUSR, and all is now working.
I am totally lost as to why this appears mandatory, and is not made more obvious.....

Thanks to both of you for your assistance, and I hope this reply one-day saves you a lot of future grief.

Best wishes,
Frank
0
 
LVL 10

Accepted Solution

by:
Espavo earned 250 total points
ID: 33504696
Very weird... and interesting...
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 33505068
I would have thought that was already set correctly.  I just keep on learning things.
0
 

Author Comment

by:FrankBabz
ID: 33505226
Well, I guess, ASP.NET does not know to whom you will impersonate or assign permssions, and you may change them.....   Nonetheless, I think there should be some help somewhere (in code) to help identify "mandatory" permssions.   Maybe there is, but it did not help me.

BTW:  I have not followed up on all 8 rows in the table.  I was going to do them one at a time, and I chose temp first, and when it worked I posted above.  For sure, you want to include App_Data (that I would certainly seem should be done automatic).
0
 

Author Closing Comment

by:FrankBabz
ID: 33807785
Thanks for your comments and suggestions that led to the solution.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Calendar Control 5 54
Json and ajax 1 44
SCOM - Service Restart 1 30
web api controller with multiple posts that accept different objects 1 25
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

738 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