By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,786 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,786 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
10 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
Juan,

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

Sabine

Nov 19 '05 #10

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.