473,385 Members | 1,355 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.

Error using access .mdb with asp.net on iis 6

ollyb303
Hi,

wasn't sure whether I should post this under .net, IIS or access, but I've plumped for .net!

I have a problem with an asp.net website which I am hosting on a windows server 2003 under IIS 6.0.

I am using an access database as the datasource for a gridview - this all works fine when I am running it on the development server in VWD 2005 express on my dev machine, but when I've uploaded the site to the server, I get a stack trace when I try to access the page with the gridview on it.

Expand|Select|Wrap|Line Numbers
  1. Server Error in '/' Application.
  2. Disk or network error.
  3. Description: An unhandled exception occurred during the execution of the
  4. current web request. Please review the stack trace for more information
  5. about the error and where it originated in the code.
  6.  
  7. Exception Details: System.Data.OleDb.OleDbException: Disk or network error.
  8.  
  9. Source Error:
  10.  
  11.  An unhandled exception was generated during the execution of the current   
  12.  web request. Information regarding the origin and location of the          
  13.  exception can be identified using the exception stack trace below.         
  14.  
  15.  
  16.  
  17.  
  18.  
  19. Stack Trace:
  20.  
  21.  
  22.  [OleDbException (0x80004005): Disk or network error.]                      
  23.  
  24.  System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARA 
  25.  MS dbParams, Object& executeResult) +267                                   
  26.     System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&               
  27.  executeResult) +192                                                        
  28.     System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, 
  29.  Object& executeResult) +48                                                 
  30.     System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior    
  31.  behavior, String method) +106                                              
  32.     System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)  
  33.  +111                                                                       
  34.  
  35.  System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(Comman 
  36.  dBehavior behavior) +4                                                     
  37.     System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,          
  38.  DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String        
  39.  srcTable, IDbCommand command, CommandBehavior behavior) +141               
  40.     System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32            
  41.  startRecord, Int32 maxRecords, String srcTable, IDbCommand command,        
  42.  CommandBehavior behavior) +137                                             
  43.     System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) 
  44.  +83                                                                        
  45.  
  46.  System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelect 
  47.  Arguments arguments) +1770                                                 
  48.  
  49.  System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSel 
  50.  ectArguments arguments) +74                                                
  51.     System.Web.UI.DataSourceView.Select(DataSourceSelectArguments           
  52.  arguments, DataSourceViewSelectCallback callback) +17                      
  53.     System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149         
  54.     System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70           
  55.     System.Web.UI.WebControls.GridView.DataBind() +4                        
  56.     System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82    
  57.  
  58.  System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()  
  59.  +69                                                                        
  60.     System.Web.UI.Control.EnsureChildControls() +87                         
  61.     System.Web.UI.Control.PreRenderRecursiveInternal() +50                  
  62.     System.Web.UI.Control.PreRenderRecursiveInternal() +170                 
  63.     System.Web.UI.Control.PreRenderRecursiveInternal() +170                 
  64.     System.Web.UI.Control.PreRenderRecursiveInternal() +170                 
  65.     System.Web.UI.Control.PreRenderRecursiveInternal() +170                 
  66.     System.Web.UI.Page.ProcessRequestMain(Boolean                           
  67.  includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
  75. ASP.NET Version:2.0.50727.1433
I've looked this up on MSDN, google, etc and have found several possible solutions, none of which have worked (changed environment variables for TMP and TEMP, ensured IIS anon account has access to temp folder, etc.) - I still get the same error...

I've never used an access db in this way before so this is pretty new to me - what could cause this? Is it because I don't have access on the server?? Could it be because my .mdb uses linked tables which link to another .mdb on our network? Am I missing something obvious?

I know my code works because it's working on the dev server... Here's the code for my Gridview:

Expand|Select|Wrap|Line Numbers
  1. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderColor="Yellow"
  2.             BorderStyle="Solid" BorderWidth="2px" DataSourceID="AccessDataSource1" Font-Names="Verdana"
  3.             Font-Size="Small" ForeColor="Black">
  4.             <Columns>
  5.                 <asp:BoundField DataField="Manager" HeaderText="Manager" SortExpression="Manager" />
  6.                 <asp:BoundField DataField="Advisor_Name" HeaderText="Advisor Name" SortExpression="Advisor_Name" />
  7.             </Columns>
  8.         </asp:GridView>
  9.  
  10.         <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/TeamLists.mdb"
  11.             SelectCommand="SELECT [Manager], [Advisor Name] AS Advisor_Name FROM [TeamAndrew]">
  12.         </asp:AccessDataSource>
I'm starting to tear my hair out here... please can someone help me??

Many thanks,

Olly
Apr 26 '08 #1
4 4526
Shashi Sadasivan
1,435 Expert 1GB
I would put my bet on the persmission set the application has on the access file. Not really sure on how to set this, if it can be done from code or from IIS itself
Apr 27 '08 #2
I would put my bet on the persmission set the application has on the access file. Not really sure on how to set this, if it can be done from code or from IIS itself
I don't think that's it... I have allowed full control access to the file for both "Everyone" and the IUSR anonymous IIS account - I have set these permissions on both the file itself and the directory through the file system on the server and on the the directory via IIS - I don't have the option of setting permissions on the file itself through IIS. I'm sure I'm allowing as much access to the file as I possibly can!!

Any other ideas?

Thanks,

Olly
Apr 28 '08 #3
kenobewan
4,871 Expert 4TB
Is it because I don't have access on the server?? Could it be because my .mdb uses linked tables which link to another .mdb on our network?
I would guess that one of these is a problem. I always have SQL Server installed dev/test/live, I dont use Access, so I assume you need the software too. Run some simple queries to test. This will also ensure your connection string is correct and eliminate linked tables in testing. HTH.
Apr 28 '08 #4
It's the linked tables... I can display data from an "unlinked" table from the server without needing access installed on the server itself - I have tested this with a simple db with no linked tables. As soon as I add a link to a table on the netowrk and attempt to display data from it, I get the same error.

Can anyone give me any tips as to how I can use linked tables in this way?

Many thanks,

Olly
Apr 29 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
1
by: annie | last post by:
Hi all, I have recently ported my Access 2000 app to SQL Server, keeping the Access client as the front end using linked tables. I am also using triggers on my SQL tables to trap orphan...
1
by: Del | last post by:
We have a MS SQL Server 2000 application for our shipping system. We have created a front end application using MS Access for our order analyst. The front end application allows the analyst to...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
4
by: RM | last post by:
Had VS .Net 2002 installed on W2k Server SP3 and supported a number of web sites. Installed VS .Net 2003 on Friday and now all web sites using .Net & MS ACCESS get this strange error upon open. ...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.