. NET to prevent Access database from downloading

Source: Internet
Author: User
. NET to prevent Access database from downloading
How to prevent Access database downloads is a very old topic, online discussion is also more. Here is only to explore the asp.net to prevent access to the database is downloaded methods, some of the previous method of summary, part of their original. There may be imperfections or even incorrect places, you are welcome to point out the progress together.
The current solutions are mainly as follows:
1. Put the database file outside the site Directory
2. Set IIS directory permissions for database files to be unreadable (IIS Information Services admin-> Select need to set directory-> right--> Properties-> Directory tab-> cancel read check box)
3. Use ODBC data source
All of the above three methods are more classic and more secure, suitable for the direct operation of the server situation (because three methods need to directly operate the server to set up), of course, this is the ASP platform to prevent access to download the solution.

Another solution under the ASP platform is to add a Long Binary tab to the database and modify the file suffix to. asp. (Details can refer to the data table of the Forum database of the Moving network)
4. Rename your Access *.asax: Because the asp.net processing mechanism, by default, such requests are rejected directly, and there will be no resource-consuming problems with the parsing process Shi mentioned. In this way, you can also rename Access to *.config,*.vb, *.cs, and so on.
5. Place your access in the bin directory under your application root (that is, the directory where you put the DLL): It has been found that IIS is configured by default to deny direct access to files in the bin directory, to secure requests for DLLs, and in fact protects the BI n Other files in the directory. But for this method, some people question: will have such a consequence, the database reads and writes will cause the assembly to be frequently refreshed, also will session and application unceasingly loses

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.