473,411 Members | 2,093 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,411 software developers and data experts.

Server Error in '/Access' Application

I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and
dropped an .mdb there.

I dragged a DetailView to the form, configured it to show two fields of a
table, and got AccessDataSource1.

The test query worked. The .mdb was not open in Access, nor was it being
used anywhere else.

Yet when I pressed Cntl+F5 I got the following error:

Can somebody tell me what I did wrong?

dennist685
Server Error in '/Access' Application
--------------------------------------------------------------------------------

Could not use ''; file already in use.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file
already in use.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:
[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnectionInternal..ctor(Ol eDbConnectionString
constr, OleDbConnection connection) +1054849

System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject) +53

System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770

System.Web.UI.WebControls.AccessDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments) +74
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +181
System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
Nov 23 '05 #1
9 3431
Hey Dennist,

WElcome to ASPNET newgroup.
Seems you're encountering some problems when try using the Access DataBase
in asp.net 2.0 web page? Are you using the AccessDataSource control or
SqlDataSource control(with OleDb provider...)? Based on my local test, I
can correctly using a simple mdb file through both the two DataSource
controls without any error, so I'm thinking this is a file specific
problem. Would you tried creating a new mdb file with a simple table in it
to see whether it works? Also, I'd suggest you view the processes list on
your dev machine through the Manager Task explore to see whether there're
any hidden Processes (like a access process which doesn't show up...) in
it. If anyone exist, you can kill it and test the page again to see whether
it works.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXwMpFiLKdu1UAnQgOnLV4KDmQIfA==
| X-WBNR-Posting-Host: 80.179.14.44
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <de********@newsgroup.nospam>
| Subject: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 05:34:02 -0800
| Lines: 81
| Message-ID: <C3**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360416
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and
| dropped an .mdb there.
|
| I dragged a DetailView to the form, configured it to show two fields of a
| table, and got AccessDataSource1.
|
| The test query worked. The .mdb was not open in Access, nor was it being
| used anywhere else.
|
| Yet when I pressed Cntl+F5 I got the following error:
|
| Can somebody tell me what I did wrong?
|
| dennist685
| Server Error in '/Access' Application
----------------------------------------------------------------------------
----
|
| Could not use ''; file already in use.
| Description: An unhandled exception occurred during the execution of the
| current web request. Please review the stack trace for more information
about
| the error and where it originated in the code.
|
| Exception Details: System.Data.OleDb.OleDbException: Could not use '';
file
| already in use.
|
| Source Error:
|
| An unhandled exception was generated during the execution of the current
web
| request. Information regarding the origin and location of the exception
can
| be identified using the exception stack trace below.
|
| Stack Trace:
|
|
| [OleDbException (0x80004005): Could not use ''; file already in use.]
| System.Data.OleDb.OleDbConnectionInternal..ctor(Ol eDbConnectionString
| constr, OleDbConnection connection) +1054849
|
|
System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOption
s
| options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection
| owningObject) +53
|
|
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup) +27
|
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
| owningConnection) +47
|
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
| outerConnection, DbConnectionFactory connectionFactory) +105
| System.Data.OleDb.OleDbConnection.Open() +37
| System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
| DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable,
| IDbCommand command, CommandBehavior behavior) +121
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
| Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
| behavior) +137
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83
|
|
System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectAr
guments arguments) +1770
|
|
System.Web.UI.WebControls.AccessDataSourceView.Exe cuteSelect(DataSourceSelec
tArguments arguments) +74
| System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments
arguments,
| DataSourceViewSelectCallback callback) +17
| System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
| System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
| System.Web.UI.WebControls.DetailsView.DataBind() +4
| System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
| System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +181
|
System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls()
| +69
| System.Web.UI.Control.EnsureChildControls() +87
| System.Web.UI.Control.PreRenderRecursiveInternal() +41
| System.Web.UI.Control.PreRenderRecursiveInternal() +161
| System.Web.UI.Control.PreRenderRecursiveInternal() +161
| System.Web.UI.Page.ProcessRequestMain(Boolean
| includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
|
|
|
|
----------------------------------------------------------------------------
----
| Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
| Version:2.0.50727.42
|

Nov 24 '05 #2
Thanks, Steve

The funny thing is if I do exactly the same thing putting the ,mdb into
c:/vs2005web/Access, and getting one of the intranet servers the page shows
fine.

I also used nwind.mdb and the same thing happened.

dennist685

Nov 24 '05 #3
Thanks for your quick response Denniest,

Seems also project or envionment specific. Have you tried creating a new
website ( in another directory , also we can try renaming the projecta) and
create some asp.net page to access mdb database to see whether the error
also occur?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXwyQfQS1sulNgiTcGk7GwG48SaWQ==
| X-WBNR-Posting-Host: 192.117.113.41
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <de********@newsgroup.nospam>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Server Error in '/Access' Application
| Date: Wed, 23 Nov 2005 23:31:06 -0800
| Lines: 10
| Message-ID: <5B**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360647
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Steve
|
| The funny thing is if I do exactly the same thing putting the ,mdb into
| c:/vs2005web/Access, and getting one of the intranet servers the page
shows
| fine.
|
| I also used nwind.mdb and the same thing happened.
|
| dennist685
|
|

Nov 24 '05 #4
Steve, I did exactly what you asked, only using a grid instead of a
detailview. However I got the same error - Exception Details:
System.Data.OleDb.OleDbException: Could not use ''; file already in use.

and the file is not in use. Access isn't open nor any other application
that is using the database by the same name in a folder somewhere else.

dennist685

Nov 24 '05 #5
Hi Dennist,

Thanks for your response.
I've also noticed your another thread titled:

"Can't edit, delete or add row in an Access database in a website...."

so I'm a bit confused on your current status on this issue? Seems you could
correctly get the access database to displaying data and edit /updaing ?

In that thread you mentioned that you've encountered new problem on
deleting.....? Please feel free to let me know if there'is anything I
didn't catch up...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 24 '05 #6
Steven,

If I open the same project in, say, c:\vs2005web\Access, then it shows.
It's only when I put it in inetpub that I get the error.

dennist685
Nov 24 '05 #7
Hey Dennist,

Thanks for your reply. After some further testing in an IIS based web
project ( thought I don't think this is the cause...), I was able to
reproduce the problem you met in some certain condition... And seems
the cause of the problem is VS.NET IDE. I'm not sure whether you've ever
view the access database through the VS.NET IDE's Server Explorer? Based
on my test, if we ever view the data in access mdb file through VS.NET
IDE's server explorer, but didn't close the connection, then at runtime,
the page using that access database will throw the exception indicate that
the mdb file is used by other process. So please have a check in your
VS.NET's server explorer to see whether there is connection to that mdb
file. If so, please select it and choose close the connection or just
delete the connetion and test again to see whether this helps.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Server Error in '/Access' Application
| thread-index: AcXw9bzcNW84Q8jSQzKfOq1Z+ojcng==
| X-WBNR-Posting-Host: 85.64.135.196
| From: "=?Utf-8?B?ZGVubmlzdDY4NQ==?=" <de********@newsgroup.nospam>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
<5B**********************************@microsoft.co m>
<BX**************@TK2MSFTNGXA02.phx.gbl>
<2A**********************************@microsoft.co m>
<L8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Server Error in '/Access' Application
| Date: Thu, 24 Nov 2005 04:51:07 -0800
| Lines: 6
| Message-ID: <59**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360712
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
|
| If I open the same project in, say, c:\vs2005web\Access, then it shows.
| It's only when I put it in inetpub that I get the error.
|
| dennist685
|

Nov 25 '05 #8
Actually Steven, in my case its stranger than that.

I tried with two databases. nwind.mdb and hasbara.mdb, which is the mdb I
use in main project. In neither case did they show up on server explorer.
Other instances of hasbara.mdb did, but there were little x's on the bottom
right. I assume that means they were not connected.

If I just allow the user to select the row, in both cases iis didn't object.
But if I allowed the user to edit, add, delete and insert rows, I got the
error I've been complaining about.

dennist685

Nov 25 '05 #9
Hi Dennist,

I've got your repro attachment, I'll perform some tests and continue to
post my response in your followup thread:

Subject: Re: Can't edit, delete or add row in an Access database in a websi
Newsgroups: microsoft.public.dotnet.framework.aspnet

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "dennist685" <de********@nospam.gmail.com>
| References: <C3**********************************@microsoft.co m>
<Bv**************@TK2MSFTNGXA02.phx.gbl>
<5B**********************************@microsoft.co m>
<BX**************@TK2MSFTNGXA02.phx.gbl>
<2A**********************************@microsoft.co m>
<L8**************@TK2MSFTNGXA02.phx.gbl>
<59**********************************@microsoft.co m>
<b3**************@TK2MSFTNGXA02.phx.gbl>
<1C**********************************@microsoft.co m>
| Subject: Re: Server Error in '/Access' Application
| Date: Sat, 26 Nov 2005 07:58:42 +0200
| Lines: 1193
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#L**************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 192.117.113.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:361029
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| "dennist685" <de********@newsgroup.nospam> wrote in message
| news:1C**********************************@microsof t.com...
| > Actually Steven, in my case its stranger than that.
| >
| > I tried with two databases. nwind.mdb and hasbara.mdb, which is the
mdb I
| > use in main project. In neither case did they show up on server
explorer.
| > Other instances of hasbara.mdb did, but there were little x's on the
| > bottom
| > right. I assume that means they were not connected.
| >
| > If I just allow the user to select the row, in both cases iis didn't
| > object.
| > But if I allowed the user to edit, add, delete and insert rows, I got
the
| > error I've been complaining about.
| >
| > dennist685
| >
|
|
|

Nov 28 '05 #10

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

Similar topics

2
by: JohnD | last post by:
I am using XP Pro and when I try and run an ASP.NET page on my own server I recieve the following error messag Server cannot access application directory ..(web directory here)... The directory...
1
by: Hemant | last post by:
Why i am getting this error. Server Error in '/' Application Runtime error Please help me out. Thank you
6
by: Javier Cortés Cortés | last post by:
i am getting this error when i am trying to access any file(with the ext. aspx) from my remote server. the error is : Server Error in '/' Application....
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
5
by: Martin Robins | last post by:
I have never dabbled with ASP.NET until now so be warned! I have created a web application with the single default form: WebForm1.aspx and when I try to display it I get this error. My...
6
by: Grant | last post by:
Hi, I'm trying to setup a web server to host asp.net 1.1... but keep getting the following error message: Hopefully someone can give me some ideas on what I may need to do. Thanks in...
2
by: Matthias Wohlmann | last post by:
Hi, I'm getting the following error when trying to start my application using Internet Explorer: "Server cannot access application directory D:\xxx. The directory does not exist or is not...
1
by: kristian | last post by:
I'm using the following entry in my web.config: web.config <customErrors mode="On" defaultRedirect="~/CMS/Default.aspx"> <error statusCode="404" redirect="~/CMS/Default.aspx"/> </customErrors> ...
2
by: Fred Flintstone | last post by:
I've been through everything with this. I have a W2003 server with VS.Net 2005 installed. Any web site I try to create gives me this error: Server Error in '/' Application It then tells me...
1
by: rajalingam | last post by:
Server Error in '/library' Application. -------------------------------------------------------------------------------- Server cannot access application directory 'F:\Library Latest Code\'. The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.