• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Avoid file download from a server

how can you Avoid file download from a server when you type:  http://www.domain.com/database.mdb

Anyone can download the database?

Thanks.

0
epmo
Asked:
epmo
  • 3
  • 3
  • 2
  • +1
1 Solution
 
dr_binksCommented:
nope, all I get is some html & java code.
0
 
epmoAuthor Commented:
well, the above url is just an example, on ours it will save the dabatase to your disk
0
 
DVation191Commented:
epmo,
Well, what do you want to happen when you go to that url? IE Can't view an .mdb file as far as I know...downloading it is all it can do.

0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
r-kCommented:
You should put your database in a folder that is not accessible from the web. That is the only way to assure that people cannot download it.
0
 
epmoAuthor Commented:
Tanks  - yes, we do not want the database to be downloaded

> a folder that is not accessible from the web

and How do you do that?
0
 
DVation191Commented:
are you using IIS or Apache?
0
 
epmoAuthor Commented:
IIS
0
 
r-kCommented:
>> a folder that is not accessible from the web
>and How do you do that?

 I am assuming this is a database used by some .asp pages to serve data via the web.

The important thing is that you can place the database file itself almost anywhere on the disk (but outside the folders accessible to the web server). For example, suppose the website is all in a folder named c:\web (and subfolders within c:\web). We may decide to put the database in a folder named c:\data.

The next step is to register your database as a data source with your system. This is done via the ODBC control panel (Control Panel -> Admin Tools -> Data Sources(ODBC)).
Click on "System DSN", then the Add button, and give it a suitable name and point it to your database in c:\data.

The final step is to use that name when accessing it from your .asp page.
For example, suppose we named it ACCOUNTS in the ODBC control panel, then you would use commands similar to the following in your web page:

Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open "DSN=ACCOUNTS"

Further details need to be filled in by you, but this way you keep your database away from the website, and still be use the data from within a web page.

There are many ASP tutorials on the web. Here's a couple:

 http://www.w3schools.com/ado/default.asp
 http://www.sitepoint.com/article/build-faq-asp-ms-access/2
 http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=166

 etc.

 Good luck.


0
 
DVation191Commented:
Title: Securing Access Database from being downloaded
Description: I would like to secure my access database from being downloaded via the web.

http://www.edthosting.com/Knowledgebase_Article.aspx?id=132
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now