Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cannot open an access database from within an ASP.NET application

Reply
Thread Tools

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

 
 
=?Utf-8?B?dnZlbms=?=
Guest
Posts: n/a
 
      10-05-2005
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
 
Reply With Quote
 
 
 
 
Grant Merwitz
Guest
Posts: n/a
 
      10-05-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q3VydF9DIFtNVlBd?=
Guest
Posts: n/a
 
      10-05-2005
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

 
Reply With Quote
 
=?Utf-8?B?dnZlbms=?=
Guest
Posts: n/a
 
      10-05-2005
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

 
Reply With Quote
 
Grant Merwitz
Guest
Posts: n/a
 
      10-05-2005
I never meant just in case --> " If you not sure, set full permissions to
everyone just incase"

I meant Just to TEST

"Grant Merwitz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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

>
>



 
Reply With Quote
 
=?Utf-8?B?dnZlbms=?=
Guest
Posts: n/a
 
      10-05-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      10-05-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?dnZlbms=?=
Guest
Posts: n/a
 
      10-05-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      10-05-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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



 
Reply With Quote
 
Sabine
Guest
Posts: n/a
 
      10-19-2005
Juan,

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

Sabine

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Re: how to open a file in some application using Tkinter i am usingTKINTER to create GUI application i want to know how to open a worddocument in open office or any other applicatio Fredrik Lundh Python 1 01-09-2008 10:40 AM
Cannot open Access database in ASP xg ASP General 5 03-20-2006 10:37 AM
How do I open a database connection on an access file that currently open ? THY ASP .Net 4 08-22-2003 03:50 PM



Advertisments