473,884 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

ollyb303
74 New Member
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 4556
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
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
ollyb303
74 New Member
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 Recognized Expert Specialist
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
ollyb303
74 New Member
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
5047
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 double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
1
8060
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 records and validate added data. My question is..
1
2814
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 review and update orders before they are released to the warehouse. We are in the test phase of this project and have run into a couple problems that we just can not figure out. During the testing phase there is only one person working in the...
6
4771
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 appreciated. Thanks in advance
6
8484
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 by VisitDt" I'm getting this error message: Errno is 2465. Err.description is "Can't find field '|' referred to in your expression"
10
2732
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 VS, however, when I change to release and put it out on the web it fails giving me the following error message The underlying connection was closed. Could not establish a trust relationship with the remote server.
4
2546
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. ASP=/TestDotNet/AdoNet.aspx System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open()...
10
8723
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 asp.net page. If I press OK then I get a page with this message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
2
19512
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
11167
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10868
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9591
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7984
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3242
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.