Recommended: Design a message sheet with ASP First, before we make the message sheet, we first create an input screen interface effect, that is, generate the html page of the input screen of the message section, and then add the ASP script to these html source codes. The html code I got here is as follows. *File name: book.htm
Server objects provide methods and properties accessed on the server. Most methods and properties are provided as functionality of a utility.grammar:
Server.property|method
Property
Server object has only one property: the maximum time the ScriptTimeout program can run
Methods
CreateObject Creates an object instance.
Execute an asp file
GetLastError Returns an error code
HTMLEncode converts the specified HTML code.
MapPath converts a relative path into an absolute path.
Transfer sends all current status information to another asp file
URLEncode converts specified code in URL form, including spaces
Detailed description of the method of Server object
CreateObject
grammar
Server.CreateObject( progID )
parameter
progID
Specify the name of the component to be created in the format as follows: [Vendor.]Component[.Version].
Key points:
Generally speaking, objects created by the Server.CreateObject method have the scope of the page. This means that when the asp program on this page is executed, this object will automatically disappear.
To create an object with Session or Application scope, you can use it in the Global.asa file
Execute
The Execute method calls an ASP file and executes it just as the ASP file of the call exists in this ASP file. This is much like calls to classes in many languages.
grammar
Server.Execute( Path )
parameter
Path
Specifies the path to the asp file to be executed. If it is an absolute path, then it must be a place (directory) in this ASP application.
explain
The Server.Execute method provides a method to perform a complex ASP application into small block units. In this way, you can build an ASP library, and you can call ASP files in your library as you need it. This is a bit like SSI! hey-hey!
When IIS executes this ASP file according to the specified ASP file path, it will automatically return the previous ASP file. This just-executed ASP file may change the HTTP head. However, like other ASP files, an error will be reported when the program tries to change the http head!
This path parameter can include an inquiry information.
If both the called and the called ASP file contain the same subfunctions, then these subfunctions only work in this ASP file. For example, if the following ASP1 and ASP2 files contain subfunctions that abandon the program. First, ASP1 calls ASP2, then the OnTransactionAbort in ASP2 begins to execute. When ASP2 is executed, the OnTransactionAbort in ASP1 begins to execute.
ASP1:
< %@ Transaction=Required%>
< %
Server.Execute (Page22.asp)
Sub OnTransactionAbort
Sub OnTransactionCommit
%>
Asp2.asp:
< %@
Transaction=Required
Sub OnTransactionAbort
Sub OnTransactionCommit
%>
Example
ASP1
< % Response.Write(I am going to execute ASP2)
Server.Execute(/myasps/asp2.asp)
%>
ASP2
< % Response.Write(Here I am)%>
GetLastError
The GetLastError method returns an ASPError Object to describe an error message. This method is only applicable before the asp file sends anything to the user machine.
grammar
Server.GetLastError ()
Important points
If a 500;100 user error has been defined in an asp application, it refers to a file with .asp as the suffix. In this case, when an error occurs when the program is running, the server will automatically transmit to the executing ASP page in Server.Transfer. The ASP application will effectively handle this error. In addition, this ASPError Object must be valid so that you can see the error message provided by the server to change this file!
Generally, Web Sites are constructed based on the file /iishelp/common/500-100.asp. You can use it to execute an asp error, and of course you can define it yourself! . If you want to change to another asp file to execute these user errors. Then you can use snap-in in IIS.
Note: When IIS discovers an error in an asp file or global.asa file, a 500;100 user error occurs. The following program will not be executed!
Example
The following three examples demonstrate that different errors can produce user errors. Three errors are:
Compilation error
Run error
Logical error
The first example proves a compilation error, which is generated when IIS tries to include a file. This error occurs because the required parameters are not defined in this include file. The second example shows a running error. The reason for the interruption of this program is that there is no next in the program. The third example shows a logical error because the program tries to divide by a 0. No!
Example 1
< %
response.write hello
%>
Example 2
< %
dim I
for i=1 to 1
nxt
%>
Example 3
< %
dim i,j
dim sum
sum=0
j=0
for i=1 to 10
sum=sum 1
next
sum=sum/j
%>
HTMLEncode
The HTMLEncode method HTML encoding of the specified string.
grammar
Server.HTMLEncode( string )
Share: How to easily crack other people’s ASP Trojan password Cracking goal: Cracking an encrypted Asp Trojan login password. Since there is no version description in the Trojan horse, I don’t know what the Trojan is called. Cracking ideas: two types: replace the ciphertext with the encrypted password and reversely solve the password using the ciphertext and encryption algorithm. The former root