Connecting Tech Pros Worldwide Forums | Help | Site Map

Connect to MS Access problem

Newbie
 
Join Date: Aug 2009
Posts: 5
#1: Aug 15 '09
hi friends

i have a problem with asp.net to connect ms access file on net
when i upload these file it does not work.

web.config code is here
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <!-- 
  3.     Note: As an alternative to hand editing this file you can use the 
  4.     web admin tool to configure settings for your application. Use
  5.     the Website->Asp.Net Configuration option in Visual Studio.
  6.     A full list of settings and comments can be found in 
  7.     machine.config.comments usually located in 
  8.     \Windows\Microsoft.Net\Framework\v2.x\Config 
  9. -->
  10. <configuration>
  11.     <appSettings/>
  12.     <connectionStrings>
  13.         <add name="tmp_dataConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\tmp_data.mdb;Persist Security Info=True"
  14.             providerName="System.Data.OleDb" />
  15.     </connectionStrings>
  16.     <system.web>
  17.         <!-- 
  18.             Set compilation debug="true" to insert debugging 
  19.             symbols into the compiled page. Because this 
  20.             affects performance, set this value to true only 
  21.             during development.
  22.  
  23.             Visual Basic options:
  24.             Set strict="true" to disallow all data type conversions 
  25.             where data loss can occur. 
  26.             Set explicit="true" to force declaration of all variables.
  27.         -->
  28.         <compilation debug="false" strict="false" explicit="true" />
  29.         <pages>
  30.             <namespaces>
  31.                 <clear />
  32.                 <add namespace="System" />
  33.                 <add namespace="System.Collections" />
  34.                 <add namespace="System.Collections.Specialized" />
  35.                 <add namespace="System.Configuration" />
  36.                 <add namespace="System.Text" />
  37.                 <add namespace="System.Text.RegularExpressions" />
  38.                 <add namespace="System.Web" />
  39.                 <add namespace="System.Web.Caching" />
  40.                 <add namespace="System.Web.SessionState" />
  41.                 <add namespace="System.Web.Security" />
  42.                 <add namespace="System.Web.Profile" />
  43.                 <add namespace="System.Web.UI" />
  44.                 <add namespace="System.Web.UI.WebControls" />
  45.                 <add namespace="System.Web.UI.WebControls.WebParts" />
  46.                 <add namespace="System.Web.UI.HtmlControls" />
  47.             </namespaces>
  48.         </pages>
  49.         <!--
  50.             The <authentication> section enables configuration 
  51.             of the security authentication mode used by 
  52.             ASP.NET to identify an incoming user. 
  53.         -->
  54.         <authentication mode="Windows" />
  55.         <!--
  56.             The <customErrors> section enables configuration 
  57.             of what to do if/when an unhandled error occurs 
  58.             during the execution of a request. Specifically, 
  59.             it enables developers to configure html error pages 
  60.             to be displayed in place of a error stack trace.
  61.  
  62.         <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
  63.             <error statusCode="403" redirect="NoAccess.htm" />
  64.             <error statusCode="404" redirect="FileNotFound.htm" />
  65.         </customErrors>
  66.         -->
  67.     </system.web>
  68. </configuration>

pls help me

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Aug 17 '09

re: Connect to MS Access problem


If your application was working locally while you were testing and no longer works after you've uploaded your application to the server then it is very likely that there is a permissions issue happening.

It would be a lot more helpful if you post any error messages that you're seeing because guessing at what's wrong is very difficult.

-Frinny
Newbie
 
Join Date: Aug 2009
Posts: 5
#3: Aug 18 '09

re: Connect to MS Access problem


thanks for try to help.
& the error is:-

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load the assembly 'App_Web_default.aspx.cdcab7d2'. Make sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@ page language="C#" autoeventwireup="true" inherits="_Default, App_Web_default.aspx.cdcab7d2" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File: /data/Default.aspx Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#4: Aug 18 '09

re: Connect to MS Access problem


Oh this looks like a server problem.
Do you have MS Access installed on your web server?

-Frinny
Newbie
 
Join Date: Aug 2009
Posts: 5
#5: Aug 18 '09

re: Connect to MS Access problem


Yes Frinaval i have access on server.......

i want also want to your email for chat if u wish....
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#6: Aug 18 '09

re: Connect to MS Access problem


Hi Atal,

Try doing something for me.
Try Publishing the web application to a folder on your local computer (maybe right onto the desktop so that you can find it easily). Once you've published the website, delete the files off of the server and replace it with the files that were created when you published the web application.

It looks like you're either missing the default.aspx page or you are missing the DLL that the default.aspx page uses (it should be located in the bin folder).

Let me know how this goes.
Newbie
 
Join Date: Aug 2009
Posts: 5
#7: Aug 19 '09

re: Connect to MS Access problem


when i publish my website web.config does not made. how can i solve this prblm.......
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#8: Aug 19 '09

re: Connect to MS Access problem


I've never had that problem before.....

My web.config (along with all of the other files required to make the website work) is copied to the folder that I'm publishing to every time I publish my web applications.

I have no idea how to fix it.
Newbie
 
Join Date: Aug 2009
Posts: 5
#9: Aug 19 '09

re: Connect to MS Access problem


hahahahaaaaaaaaaaa

but it happens with me.

thanks to try help me. but i am waiting for ans.........
ssnaik84's Avatar
Member
 
Join Date: Aug 2009
Location: Bengaluru, India
Posts: 124
#10: Aug 20 '09

re: Connect to MS Access problem


web.config is just a XML file.
No need of compilation.
copy it from your project source directory.
modify as per your server settings and then upload.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#11: Aug 20 '09

re: Connect to MS Access problem


The thing is that the web.config is a file required in order for the website to work.

When Visual Studio publishes web sites/applications it copies all of the files required in order for the site to work into the place that it's publishing the website to.

If the web.config file is not copied, then it is very likely that other required files and resources are not being copied also.
ssnaik84's Avatar
Member
 
Join Date: Aug 2009
Location: Bengaluru, India
Posts: 124
#12: Aug 20 '09

re: Connect to MS Access problem


thats right.. try publishing with "all project files" option
Reply