Last post Jun 07, 2011 06:42 PM by AS_at_silverlight
Jan 15, 2008 11:40 PM|sachin_07|LINK
I need help....its very urgent......
I know that there are many posts regarding this issue. I have tried many solutions that have been posted at this website and others regarding this issue and have not had complete success in resolving it.
I have a running website ...(which is live & Access database using ASP.NET 2.0)
I got following error...
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.
System.Data.OleDb.OleDbException: Could not use ''; file already in use.
Line 21: End If
Line 22: Catch ex As Exception
Line 23: Throw ex
Line 24: End Try
Line 25: End Sub
[OleDbException (0x80004005): Could not use ''; file already in use.]
Classifieds_AdsLeftNav.PageLoad(Object sender, EventArgs e) in E:\inetpub\vhosts\mysite.com\httpdocs\Classifieds\AdsLeftNav.ascx.vb:23
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
Jan 16, 2008 03:14 AM|Mikesdotnetting|LINK
It's a permissions issue. You need to make sure that the Windows account that your application is running under has
Modify permissions on the folder containing the database. In Win XP Pro, this is the ASPNET account. On Windows 2003 Server, it's the NETWORK SERVICE account. If you have set impersonate=true in your web.config, it's the IUSR_machinename
Jan 16, 2008 03:40 AM|mohi88|LINK
this situation my happen in many ways;
one of this; if you use the data adapter without closing the adapter after finish!
- as i can see that you are using ms access, if you open the database with ms access ( even if you close it after finish) you may have such error ,( if you close the database without closing ms access).
as an idea try to use
try-catch-finally statement or use "USE" statement for data progress.
hope this helps
Jan 16, 2008 04:14 AM|sachin_07|LINK
Hey Thanks Mike.....
Jun 07, 2011 06:42 PM|AS_at_silverlight|LINK
You need to make sure that the Windows account that your application is running under has
Modify permissions on the folder containing the database.
I was searching for an answer to the error message:
Could not use ''; file already in use.
and I found this forum topic. Setting the containing folder permissions solved my problem, but I noticed that I only needed
Write permission on the containing folder (for the ASPNET account) I also noticed that setting the
Modify permission automatically set the Write permission.
I encountered this error while trying to load the DataBindingWithDB.aspx page from Chapter 11 of
Microsoft ASP.NET 2.0 Step by Step by George Shepherd into IE 8 running on WinXP Pro SP3, using ASP.NET 2.0.50727 & IIS 5.1.