473,385 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Cannot open an access database from within an ASP.NET application

Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki
Nov 19 '05 #1
10 2109
1)
Is the database open?
If you have the database open in Access, you will get this exception.
So if you have the database open, close it and try again.

2)
If your sure you don't have the database open, check that its closed
properly.
When you open an Access database file for editing, it create a temp file
called "samplebrowser.idb".
When you close the database, that file disapears.
If its still there, the database may have not closed properly, try closing
it again

3) Lastly

Try setting persmissions to IUSR_<machine_name>,
thats the user IIS uses.
If you not sure, set full permissions to everyone just incase

HTH

"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com...
Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened
exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki

Nov 19 '05 #2
Folder & File.
Also, check your IIS settings, are you using anonymous or integrated
security? That determins the user you need to set for permissions.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"vvenk" wrote:
Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki

Nov 19 '05 #3
Curt:

In the website's security setting, Enable_Anonymous_Access is checked and
the it uses the account IUSER_<machine_Name> for access. And, I made sure
that this account has full access rights.

Also, Integrated Windows Authentication is checked as well.

Venki

"Curt_C [MVP]" wrote:
Folder & File.
Also, check your IIS settings, are you using anonymous or integrated
security? That determins the user you need to set for permissions.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"vvenk" wrote:
Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki

Nov 19 '05 #4
I never meant just in case --> " If you not sure, set full permissions to
everyone just incase"

I meant Just to TEST

"Grant Merwitz" <gr***@workshare.com> wrote in message
news:OK**************@TK2MSFTNGP09.phx.gbl...
1)
Is the database open?
If you have the database open in Access, you will get this exception.
So if you have the database open, close it and try again.

2)
If your sure you don't have the database open, check that its closed
properly.
When you open an Access database file for editing, it create a temp file
called "samplebrowser.idb".
When you close the database, that file disapears.
If its still there, the database may have not closed properly, try closing
it again

3) Lastly

Try setting persmissions to IUSR_<machine_name>,
thats the user IIS uses.
If you not sure, set full permissions to everyone just incase

HTH

"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com...
Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened
exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki


Nov 19 '05 #5
Grant:

When I gave the account, Everybody, Full Control, it worked. Now, I have to
figure out who really needs that level of access.

Thanks.

"Grant Merwitz" wrote:
1)
Is the database open?
If you have the database open in Access, you will get this exception.
So if you have the database open, close it and try again.

2)
If your sure you don't have the database open, check that its closed
properly.
When you open an Access database file for editing, it create a temp file
called "samplebrowser.idb".
When you close the database, that file disapears.
If its still there, the database may have not closed properly, try closing
it again

3) Lastly

Try setting persmissions to IUSR_<machine_name>,
thats the user IIS uses.
If you not sure, set full permissions to everyone just incase

HTH

"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com...
Hello:

When I tried to use an Access database, I get the following exception:

Server Error in '/WebGrid' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file 'D:\Program
Files\Infragistics\NetAdvantage 2005 Volume
2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened
exclusively
by another user, or you need permission to view its data.

I made sure that the folder, Data, has full access to these two accouhts,
<machine_name>\aspnet and <machine_Name>\IWAM_machine_name

Can somebody tell me how I can resolve this issue? Thanks.

Venki


Nov 19 '05 #6
To find out which account needs access permission,
save the following as identity.aspx and run it.

identity.aspx
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
------------------

When you run that file, it will return the current ASP.NET identity,
i.e., the account ASP.NET is running as.

Give *that* account the access permissions to the directory and file.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
Curt:

In the website's security setting, Enable_Anonymous_Access is checked and
the it uses the account IUSER_<machine_Name> for access. And, I made sure
that this account has full access rights.

Also, Integrated Windows Authentication is checked as well.

Venki

"Curt_C [MVP]" wrote:
Folder & File.
Also, check your IIS settings, are you using anonymous or integrated
security? That determins the user you need to set for permissions.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"vvenk" wrote:
> Hello:
>
> When I tried to use an Access database, I get the following exception:
>
> Server Error in '/WebGrid' Application.
> --------------------------------------------------------------------------------
>
> The Microsoft Jet database engine cannot open the file 'D:\Program
> Files\Infragistics\NetAdvantage 2005 Volume
> 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
> by another user, or you need permission to view its data.
>
> I made sure that the folder, Data, has full access to these two accouhts,
> <machine_name>\aspnet and <machine_Name>\IWAM_machine_name
>
> Can somebody tell me how I can resolve this issue? Thanks.
>
> Venki

Nov 19 '05 #7
Juan:

Thank you so much for thsi jewel. I came to know that Network Services needs
to have full control on this folder.

Venki

"Juan T. Llibre" wrote:
To find out which account needs access permission,
save the following as identity.aspx and run it.

identity.aspx
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
------------------

When you run that file, it will return the current ASP.NET identity,
i.e., the account ASP.NET is running as.

Give *that* account the access permissions to the directory and file.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
Curt:

In the website's security setting, Enable_Anonymous_Access is checked and
the it uses the account IUSER_<machine_Name> for access. And, I made sure
that this account has full access rights.

Also, Integrated Windows Authentication is checked as well.

Venki

"Curt_C [MVP]" wrote:
Folder & File.
Also, check your IIS settings, are you using anonymous or integrated
security? That determins the user you need to set for permissions.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"vvenk" wrote:

> Hello:
>
> When I tried to use an Access database, I get the following exception:
>
> Server Error in '/WebGrid' Application.
> --------------------------------------------------------------------------------
>
> The Microsoft Jet database engine cannot open the file 'D:\Program
> Files\Infragistics\NetAdvantage 2005 Volume
> 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
> by another user, or you need permission to view its data.
>
> I made sure that the folder, Data, has full access to these two accouhts,
> <machine_name>\aspnet and <machine_Name>\IWAM_machine_name
>
> Can somebody tell me how I can resolve this issue? Thanks.
>
> Venki


Nov 19 '05 #8
re:
Thank you so much for this jewel.
You're very much welcome, wenk.

I wrote that script, in desperation, after butting my head against
the wall for hours with exactly the same problem you were having.

It sure makes configuring ASP.NET permissions easier, doesn't it ?

;-)

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com... Juan:

Thank you so much for thsi jewel. I came to know that Network Services needs
to have full control on this folder.

Venki

"Juan T. Llibre" wrote:
To find out which account needs access permission,
save the following as identity.aspx and run it.

identity.aspx
-------------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
------------------

When you run that file, it will return the current ASP.NET identity,
i.e., the account ASP.NET is running as.

Give *that* account the access permissions to the directory and file.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"vvenk" <vv***@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
> Curt:
>
> In the website's security setting, Enable_Anonymous_Access is checked and
> the it uses the account IUSER_<machine_Name> for access. And, I made sure
> that this account has full access rights.
>
> Also, Integrated Windows Authentication is checked as well.
>
> Venki
>
> "Curt_C [MVP]" wrote:
>
>> Folder & File.
>> Also, check your IIS settings, are you using anonymous or integrated
>> security? That determins the user you need to set for permissions.
>> --
>> Curt Christianson
>> site: http://www.darkfalz.com
>> blog: http://blog.darkfalz.com
>>
>>
>>
>> "vvenk" wrote:
>>
>> > Hello:
>> >
>> > When I tried to use an Access database, I get the following exception:
>> >
>> > Server Error in '/WebGrid' Application.
>> > --------------------------------------------------------------------------------
>> >
>> > The Microsoft Jet database engine cannot open the file 'D:\Program
>> > Files\Infragistics\NetAdvantage 2005 Volume
>> > 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
>> > by another user, or you need permission to view its data.
>> >
>> > I made sure that the folder, Data, has full access to these two accouhts,
>> > <machine_name>\aspnet and <machine_Name>\IWAM_machine_name
>> >
>> > Can somebody tell me how I can resolve this issue? Thanks.
>> >
>> > Venki

Nov 19 '05 #9
Juan,

This aspx file is marvelous, it helped me a lot. Thank you very much.

Sabine

Nov 19 '05 #10
You're very much welcome, Sabine.

Feel free to pass it along to anybody who needs it.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Sabine" <sa*************@skynet.be> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Juan,

This aspx file is marvelous, it helped me a lot. Thank you very much.

Sabine

Nov 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bailee220 | last post by:
I have included the following code to open an Access database form from within an exsisting Access database. But when I run the code, it appears that it opens the database because in windows...
2
by: plau011 | last post by:
Hello Access gurus, I am curious as to why you can't open an Access 2003 Db with Access 2000. We have a Visual Basic application which is using DAO 3.6 to connect to the Access database. It IS...
3
by: POL8985 | last post by:
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
4
by: snow | last post by:
Hi all, I have a VB.net program installed in a xp home with sp2,after installation, get error "Cannot open a database from a previous version of your application. The database is a 97 Access...
2
by: bbasberg | last post by:
I have been working hard to clean up my code but I am still wondering why all incoming records go to the "AddNew" part of the IF statement and never to the Edit alternative. I believe that it must be...
5
by: Ian | last post by:
I am trying to: 1. Open a form on the external database 2. Enter a value in a text box on that form I have 1 above working OK using module form “The Access Web”, the module looks like this: ...
1
by: martinbr_2000 | last post by:
I have an access database that has been split and resides in the network share. When the access database is currently being updated by someone, and I try to open the database, I cannot open the...
14
by: SimeonD | last post by:
Hi I have an access database called Sales.Mdb In vb.net 2005, I'd like to open it. Which I can do. What I can't figure out is how to figure out if Sales.Mdb is open already. If so, I want to open...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.