Re: MS Access DB used by both a local App and .net Web App

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Here is the KB I mentioned:

http://support.microsoft.com/default.aspx?scid=kb;en-us;136128
Required Folder Permissions
If you plan to share a database, the .mdb file should be located in a folder
where users have read, write, create, and delete (or full control)
permissions. Even if you want users to have different file permissions (for
example, some read-only and some read-write), all users sharing a database
must have read, write, and create permissions to the folder. You can,
however, assign read-only permissions to the .mdb file for individual users
while still allowing full permissions to the folder.

"Greg Burns" <greg_burns@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23OHwBSB3FHA.3976@xxxxxxxxxxxxxxxxxxxxxxx
> MS Access is weird. We run into this all the time on our network where we
> want some users to have full rights to a database, and others have only
> read rights. Turns out if the read-only people connect while a
> full-rights person is connected they get "blocked"(!) See, no matter what
> your rights to the .mdb, you have to have full-rights to the .ldb (maybe
> even create it, if it is not present) in order for Access to work
> properly. (Access suxs for this, but wacha goin do).
>
> The solution for multiple users on a network share is to place the .mdb
> file in a folder. Permission the folder for with full-rights for
> everbody. Then restricts rights to the .mdb file itself for the read-only
> folks. This allows everybody to create/write the .ldb file. A nasty side
> effect is that the read-only folks can create/write to any other files in
> the subfolder. You cannot just permission the .ldb explicitly, because
> sometimes it get deleted.
>
> (There is a KB article on the above, I'll try and track it down._
>
> OK. How does this apply to a web app...
>
> If the .mdb was on the same server, you would just give the local ASPNET
> user full rights to the folder that contains the .mdb. There, problem
> solved. :)
>
> Since you database is on a different server you have to do more. This is
> what I do all time; "Pass-through authentication".
>
> The steps:
> #1. Change the password for your ASPNET user on the webserver. (If will
> give dire warnings, but just do it). Set it to something secret.
> #2. Open machine.config on webserver. Fine the processModel section.
> Change password from "autogenerate" to your new password.
>
> Run iisreset to restart webserver (or just reboot webser). (If you ever
> apply .dotnet SP1 or a future SP; it will reset the ASPNET password back
> to some unknown, and things will break - cause it won't match what the
> machine.config says. Just reset it again, and double check the account
> didn't get lock out.)
>
> Now ASP.NET is running on your webserver with the still limited user
> account; ASPNET, but now with a known password. (that is the key to making
> this work)
>
> #3. On network share server, create a local account named "ASPNET". Make
> password the same as above.
> #4. Permission the folder containing your .mdb file on this server, so
> that this local account has read-write access to the entire folder(!).
>
> You could have made a domain account, and changed your webserver to run
> using it instead. But then you would have to assign that domain account
> the same rights as the local ASPNET user on the webserver for things to
> work correctly. (That is tricky to do, and not necessary using
> pass-through). There are KB on how to do this, but doesn't seem worth the
> hassel to me.
>
> Added bonus: this method works also if you ever need to connect to SQL
> Server running on another server than your webserver.
>
> Let me know what you need cleared up. I'm typing pretty fast. :)
>
> Greg
>
> "Greg Burns" <greg_burns@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:OB7DDHB3FHA.2676@xxxxxxxxxxxxxxxxxxxxxxx
>>I think my suggestion from 3 years ago still is good advice:
>>
>> "Downloaded FileMon and took another look. Appears ASPNET didn't have
>> the
>> rights I thought it did to the database and the folder it resides in.
>> Fixed
>> that, and the problem cleared up"
>>
>> The ASPNET user must have read/write access to the folder containing your
>> .mdb file.
>>
>> Greg
>>
>>
>> "JonnyD" <manning.jon@xxxxxxxxx> wrote in message
>> news:1130538278.069810.262170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>I found this thread but I didn't follow how the problem was fixed.
>>> http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_frm/thread/7e997dac281a7460/f380ef822df6e91c?q=ASP.NET+%26+MS+Access&rnum=1#f380ef822df6e91c
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Have database mismatch, can I move NTDS.dit and Exchange to new identical server?
    ... Check the physical location of the Winnt\NTDS\ folder. ... Check the permissions on the \Winnt\NTDS folder. ... as it may not be the database that is the ... MCSA + Exchange ...
    (microsoft.public.win2000.active_directory)
  • Re: Help - locked out of database
    ... IT checked all the permissions and everything seems to be ok. ... "Joan Wild" wrote: ... I have poured a year into this database - is there someway to recover this? ... You need, at minimum, modify permission on the folder. ...
    (microsoft.public.access.security)
  • Re: Shared v. Exclusive Access
    ... The folder wherein the frontend resides grants Full permissions to the ... When I open the database, however, I don't get the message boxes. ...
    (microsoft.public.access.security)
  • Re: error updating access database using where on number column
    ... The solution was not to set permissions for the folder, ... Again, pardon my crankiness, this is my third monday this week and it's only ... In order to use a database concurrently ...
    (microsoft.public.inetserver.asp.db)
  • Re: Display of Message "You do not have eclusive access toa databa
    ... > in the foder that has the database. ... >> permissions on the folder, then have one of them open the folder in ... >> permissions on the folder. ... >> Ian Shaw wrote: ...
    (microsoft.public.access.security)