How to Prevent mdb databases from being downloaded in IIS

Source: Internet
Author: User
Tags mdb database

There are two methods to prevent access (mdb) database downloads:

Method 1: website administrators are required to have specific asp programming experience.
Because the current system for selling virtual hosts has already created a database directory for users at the same level as the web directory. Users access files on the web, but cannot access the files in the database directory. Therefore, you need to put the database files in the database directory, but it is not so easy to implement. You need to obtain the actual directory of the mdb file, mainly the location where the database is connected and need to be modified.

The following describes how to obtain any file in the web root directory. For example

The database address is E: \ database \ 123. mdb.
When connecting to the database, the code is connstr = "Provider = Microsoft. Jet. OLEDB.4.0; Data Source = E: \ database \ 123.mdb"

Method 2: This is relatively simple. If you are a VM user, you can contact the server administrator for configuration. If you have the Server Management permission, you can do the following.

How can I prevent mdb databases from being downloaded? This article discusses how to disable mdb-format database files from being downloaded on the server side, instead of adding an anti-download table to the database, and change the database name to the suffix format such as asp and asa with # numbers.
The following uses IIS6.0 as an example to describe how to disable mdb database download on the server side. Create a new notepad file without entering any content. Change the file name to NoDownload. dll, copy it to the C: \ Windows \ System32 \ (Win2000 is C: \ WinNT \ System32 \) directory, open the IIS Service Manager, select the site to be set, right click, select "properties", open the site Properties dialog box, switch to the "home directory" tab, and click "Configure" at the bottom of the page.


The application configuration window is displayed. On the ing tab, click Add at the bottom to bring up the Add/edit application extension ing window.
Click "Browse", find the NoDownload. dll file, enter ". mdb" in the "extension" text box, set the action to all actions, and click "OK" to save the settings.

In this way, when you directly enter the database address for access, an HTTP 404 error will be prompted, indicating that "the file or directory is not found", and download tools such as FlashGet cannot be downloaded.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.