Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. includes errors

includes errors

Scheduled Pinned Locked Moved Web Development
databasesecurityxmlhelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    evlxtc
    wrote on last edited by
    #1

    all worked fine till uploading it. NOW errors My include in my ASP is This picks up the included file fine and then this is the include file <% ' FileName="Connection_ado_conn_string.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="false" ' Catalog="" ' Schema="" Dim MM_laptop_STRING MM_laptop_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://www.comptraders.co.za/Laptop.mdb;Persist Security Info=False" %> From there I get an error then that it cannot find my mdb.(OR invalid file)???? Even if I do the Source=Laptop.mdb Nothing works. Error 80004005 Invalid file ??? ALL my files is now in ONE directory (ROOT) Before I actually moved all to one dir I had error 0126 that it cannot find the file. ANY IDEAS PLEASE? I am getting a bit irritated with this now ? :) this is me

    E 1 Reply Last reply
    0
    • E evlxtc

      all worked fine till uploading it. NOW errors My include in my ASP is This picks up the included file fine and then this is the include file <% ' FileName="Connection_ado_conn_string.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="false" ' Catalog="" ' Schema="" Dim MM_laptop_STRING MM_laptop_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://www.comptraders.co.za/Laptop.mdb;Persist Security Info=False" %> From there I get an error then that it cannot find my mdb.(OR invalid file)???? Even if I do the Source=Laptop.mdb Nothing works. Error 80004005 Invalid file ??? ALL my files is now in ONE directory (ROOT) Before I actually moved all to one dir I had error 0126 that it cannot find the file. ANY IDEAS PLEASE? I am getting a bit irritated with this now ? :) this is me

      E Offline
      E Offline
      enjoycrack
      wrote on last edited by
      #2

      hi there, evlxtc wrote: _Data Source=http://www.comptraders.co.za/Laptop.mdb_ just guess: Data Source should be the physical path on server u hosted ur website << >>

      E 1 Reply Last reply
      0
      • E enjoycrack

        hi there, evlxtc wrote: _Data Source=http://www.comptraders.co.za/Laptop.mdb_ just guess: Data Source should be the physical path on server u hosted ur website << >>

        E Offline
        E Offline
        evlxtc
        wrote on last edited by
        #3

        SERVER IN USA ME IN RSA I do not know the physical (C:\ what ever) path on that server, but surely that should not be needed. The http:// path I put in I can see the files there if I type it in by hand each one, but the one does not pick the other up??? What to do? this is me

        J 1 Reply Last reply
        0
        • E evlxtc

          SERVER IN USA ME IN RSA I do not know the physical (C:\ what ever) path on that server, but surely that should not be needed. The http:// path I put in I can see the files there if I type it in by hand each one, but the one does not pick the other up??? What to do? this is me

          J Offline
          J Offline
          JKroschel
          wrote on last edited by
          #4

          There are a couple problems with your setup. First, you can't connect ADO through HTTP, which is what you are doing by using the URL (http://....). Granted, you can see the file when you type in its url, but that just allows you to download the database via your browser. HTTP doesn't have anything to do with ADO, which is what you use to get the data out of the file and into your page. You will have to use the actual file system path. Here is how you can find the path to the folder your database is in. Make a file with the following code and place it in the same folder as your database and browse for it. <% longpath=Server.MapPath(".") Response.Write(longpath) %> This will show you the full path to this file. Subtitute the filename of the database with the file name of the script, and there is your path to the database. The second problem I see here is that you have published your database to a folder that is viewable to the entire world. This means that anyone could go to your site and download the entire database file. Perhaps your database does not have any sensitive data, but let's say for example that you had login names and passwords in it. Someone could download your database, open it, and have full access to your site. This is pretty poor security. If I were you, I'd call up my hosting company and ask about a database folder which is outside of the document root, thus placing the database somewhere that only you can access it. They will also tell you the path to this folder, which solves your first problem as well.

          E 1 Reply Last reply
          0
          • J JKroschel

            There are a couple problems with your setup. First, you can't connect ADO through HTTP, which is what you are doing by using the URL (http://....). Granted, you can see the file when you type in its url, but that just allows you to download the database via your browser. HTTP doesn't have anything to do with ADO, which is what you use to get the data out of the file and into your page. You will have to use the actual file system path. Here is how you can find the path to the folder your database is in. Make a file with the following code and place it in the same folder as your database and browse for it. <% longpath=Server.MapPath(".") Response.Write(longpath) %> This will show you the full path to this file. Subtitute the filename of the database with the file name of the script, and there is your path to the database. The second problem I see here is that you have published your database to a folder that is viewable to the entire world. This means that anyone could go to your site and download the entire database file. Perhaps your database does not have any sensitive data, but let's say for example that you had login names and passwords in it. Someone could download your database, open it, and have full access to your site. This is pretty poor security. If I were you, I'd call up my hosting company and ask about a database folder which is outside of the document root, thus placing the database somewhere that only you can access it. They will also tell you the path to this folder, which solves your first problem as well.

            E Offline
            E Offline
            evlxtc
            wrote on last edited by
            #5

            Thanks. I actually had my db in another folder and more secure but in utter frustration of it all not working moved it to the same folder just to get it working. I will try this asap amnd get it working FIRST and then worry about the location and security. The server was also just built (because of my request) so I am not sure that it is all set up correctly on there side, but I am sure it must be THANKS AGAIN FOR THE DETAILED ANSWER. this is me

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups