ASP.NET and MS Access

methor

New Member
I am working on a C# Web Application and I get the following error when establishing a connection to MS Access Database.<BR>The Microsoft Jet database engine cannot open the file 'D:MyProjectsAccountDataAccounts.mdb'. It is already opened exclusively by another user, or you need permission to view its data. <BR><BR>The same routine is able to establish connection for a C# Windows Application but not for C# Web Application. I would appreciate any suggestions on this matter<BR><BR>ThanksThis problem usually happens when you have the Database open in Access. Close Access and the lock will be removed. Hope this helps.I did try it and it still does not work. Does this has to do something with the security?did you give perms to the IUSR_<machinename> account? You might also need to give perms to ASPNET_WP account.Sorry to ask you this but How do I give perms to the IUSR_<machinename>account?right-click on the directory the mdb is in or on the mdb itself, click the 'security' tab, add the account for IUSR_WhateverYourMachineIsCalled, assign permissions....The same error happened to me when I selected the "Repare table" option in access (just to put the autonumber to 0 after deleting all the fields), so I created a new one with the same fields and it works. Aniway go to your IIS configuration and give all permissions to Users (EveryOne) or at least Read permissions.<BR><BR>Hope it is useful,<BR><BR>Salvador Gallego.I used to get this error all the time when running database driven web applications. ChrisN is correct if you add the IUSR_[MACHINE NAME] to the account that should fix the locking issue. It also seems to be specific to MS Access as I've never had the problem with SQL Server. Probably has to do with the way it handles concurrent users (or lack there of). Hope this helps. TomThanks Chris N and every body. It worked.
 
Back
Top