Problems with Password Protected Access DB

  • Thread starter Thread starter DanB
  • Start date Start date
D

DanB

I can access a password protected mdb file just fine when I write a VB
dotnet windows application.

However using the same connection string and running in a VB dotnet web
application I get an exception:

"The Microsoft Jet database engine cannot open the file
'C:\Inetpub\wwwroot\fpdb\NewGoodGas.mdb'. It is already opened exclusively
by another user, or you need permission to view its data."

It is not already opened so it must be the permission thing.

Any ideas?

Dan

P.S. Sorry for the double posting - didn't know which ng this should go to.
 
Hi,

Verify if the local aspnet account has enough NTFS privileges on the
database file (or networking service if you are running w2003)
 
¤ I can access a password protected mdb file just fine when I write a VB
¤ dotnet windows application.
¤
¤ However using the same connection string and running in a VB dotnet web
¤ application I get an exception:
¤
¤ "The Microsoft Jet database engine cannot open the file
¤ 'C:\Inetpub\wwwroot\fpdb\NewGoodGas.mdb'. It is already opened exclusively
¤ by another user, or you need permission to view its data."
¤
¤ It is not already opened so it must be the permission thing.
¤
¤ Any ideas?

Yes, it is a permissions issue. There is a KB article that documents the issue Miha mentioned. It
assumes you're not using impersonation for the web application:

PRB: Cannot connect to Access database from ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316675

If you are using impersonation with authentication then you need to provide sufficient permissions
for the IDs of the users to access the database. If you are using impersonation with Anonymous
authentication then sufficient permissions must be provided to the IUSR_<MACHINENAME> account.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Yes that's it.
Thanks allot.

Dan

Miha Markic said:
Hi,

Verify if the local aspnet account has enough NTFS privileges on the
database file (or networking service if you are running w2003)

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

DanB said:
I can access a password protected mdb file just fine when I write a VB
dotnet windows application.

However using the same connection string and running in a VB dotnet web
application I get an exception:

"The Microsoft Jet database engine cannot open the file
'C:\Inetpub\wwwroot\fpdb\NewGoodGas.mdb'. It is already opened
exclusively
by another user, or you need permission to view its data."

It is not already opened so it must be the permission thing.

Any ideas?

Dan

P.S. Sorry for the double posting - didn't know which ng this should go
to.
 
Thanks,
Guess I need to bone up on security

Paul Clement said:
¤ I can access a password protected mdb file just fine when I write a VB
¤ dotnet windows application.
¤
¤ However using the same connection string and running in a VB dotnet web
¤ application I get an exception:
¤
¤ "The Microsoft Jet database engine cannot open the file
¤ 'C:\Inetpub\wwwroot\fpdb\NewGoodGas.mdb'. It is already opened exclusively
¤ by another user, or you need permission to view its data."
¤
¤ It is not already opened so it must be the permission thing.
¤
¤ Any ideas?

Yes, it is a permissions issue. There is a KB article that documents the issue Miha mentioned. It
assumes you're not using impersonation for the web application:

PRB: Cannot connect to Access database from ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316675

If you are using impersonation with authentication then you need to provide sufficient permissions
for the IDs of the users to access the database. If you are using impersonation with Anonymous
authentication then sufficient permissions must be provided to the
 
Back
Top