Groups > Databases > Access Databases and AccessDataSource Control > Re: ASP.NET problem with MS Access DB




ASP.NET problem with MS Access DB

ASP.NET problem with MS Access DB
Thu, 3 Apr 2008 06:38:19 +0000
Hi there,

I am developing an ASP.NET application and I have tested it on my machine, both
on VS server and IIS, and everything went OK. My website is accessing MS Acess
DB that is located somewhere else (as a shared folder). When I deploy it on the
deployment server, it gives me the following error message 

System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open
the file <filename>. It is already opened exclusively by another user, or
you need permission to view its data.

I have tried to give the following users the full control (just to try things)
on the shared folders containing MS Access files

1)      Your account

2)      IIS_WPG

3)      Network Service or ASPNET 

4)      Network 

But still the problem is there. Did anyone face a similar problem? 

Regards
Post Reply
Re: ASP.NET problem with MS Access DB
Thu, 3 Apr 2008 09:58:58 +0000
did you try Impersonation that would be another solution for this type of
problem.. i faced this problem earlier which i solved with impersonating the
site...

check out this link > 

Connecting to a Microsoft Access database with ASP.NET

you can impersonate you site with the Account User / Password which is having
full access right persmission on the shared folder where access database is
resides ..

under System.Web section of Web.Config file..

<identity impersonate="true"
 userName="User_Having_Full_access_to_that_perticular_shared_folder"
password="password" />  hope it helps./.
Post Reply
Re: ASP.NET problem with MS Access DB
Thu, 3 Apr 2008 12:44:03 +0000
http://databases.aspfaq.com/database/why-can-t-i-access-a-database-or-text-file-
on-another-server.html relates to classic ASP, but if you use Impersonation as
suggested previously the user will be IUSR_machinename, which you can
synchronise across the network. Otherwise, it's ASPNET on XP Pro, or NETWORK
SERVICE on Win 2k3
Post Reply
about | contact