The main purpose of setting up a firewall for a Web page is to provide different services to different visitors based on the content of the Web page, which we can easily do with Java script or VB script. But the source of the Web page in the client browser can be seen, visitors can view the user identification method used, this is only a surface form of the firewall. ASP is the middle tier of client/server architecture on the Web, although it is written using scripting language (Java script,vb script, etc.), program code runs on the server, and the client sees only dynamic HTML files exported by ASP, but the ASP still has some vulnerabilities. Take certain means can also see the source code of the ASP program. By combining ASP with SQL Server, we can design simple, efficient, and reliable applications. The following is a brief introduction to its establishment process.
I. Establishment of LOGIN
Create login and password for visitors on SQL Server.
Second, create a database DSN on a network server
Use the ODBC Data Source Administrator in Control Panel to create an ODBC data resource name for a database, DSN, so that you can later connect to a specific database by using a database DSN.
The ODBC Data Source Administrator provides three types of DSN, User DSN, System DSN, and File DSN, respectively. The user DSN saves the appropriate configuration information in the Windows registry, but only the logged-on user who created the DSN is allowed to use it. The System DSN also saves the configuration information in the system registry, but unlike the user DSN, the System DSN allows all users who log on to the server to use it.
Unlike the two database DSNs, the file DSN saves specific configuration information in a specific file on your hard disk. File DSNs allow all users who log on to the server to use it, and can provide access support for the database DSN even if no user is logged on. In addition, because the file DSN is saved in the hard disk file, it can be easily copied to another machine. This allows users to make any changes to the system registry and use DSN created on other machines directly.
In the above three kinds of database DSN, it is recommended that users select System DSN or File DSN, if users prefer File DSN portability, you can set the file access rights under the NT system to obtain higher security.
To create a new DSN, the user first selects Add, and then in the pop-up window, selects the type of database to which the user will establish the connection and selects the SQL Server item in the list. If the user is creating a file DSN, click the Next button and in the subsequent dialog box, enter the filename and save path for the file DSN that you want to create. If the user is creating a System DSN, click Finish.
After the database has been selected, the user needs to set up the database DSN. Users need to select the specific server that provides the database service, set the login username and password, and the database to which the user will connect.
Third, program design
The next thing to implement is a simple page firewall function. This page only restricts access to users within the intranet of this unit (assuming that the IP address of the intranet is from 10.61.96.)
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.