Server objects provide access to methods and properties on the server, most of which are functional services as utility programs. (IIS HELP translation)
With Server objects, you can start ActiveX object routines on the server and use Active Server services to provide functions like HTML and URL encoding.
1. Script.ScriptTimeout
After the script has been run for a period of time, the timeout is performed.
The server's general default script run time is 90 seconds.
You can see from the properties pop-up box of "Default Web Site" in "Internet Information Services", and you can also set it yourself.
Haha, the one above is not, it's 900 seconds.
It should be the "Configuration" dialog box in the "Home Directory" tab, the same as WINXP.
Before understanding the script running time, let’s take a look at a program, and its main function is to calculate the web page execution time.
[Ctrl+A All selections are given for copying: you can modify some codes first, and then click Run]
Of course, the corresponding ASP is to see the page execution time displayed by many sites.
1, time.asp
<%startime=timer()%> <a href=#bot>Let's see the execution time below</a> <% for i= 1 to 5000 response.write("<hr>") next %> Of course, other content can be added in the middle. <br> <%endtime=timer()%> <a name=bot></a> <%=FormatNumber((endtime-startime)*1000,3)%>ms |
Then if the above program becomes for i= 1 to 5000000
Haha, is it the feeling that the machine can’t react soon? Then this is the execution time of the script.
In order to enable the program to execute well, it is time to take the script execution time for a long time.
How to make it longer? Change the default? Haha, of course not:)
<%Server.ScriptTimeout=110%> |
Of course, if the time setting is greater than the default 90 seconds, the current code is: specify that the server processing script timeout after 110 seconds.
Also, the determination of script time depends on your own program. Generally, it is almost the same as about 100 seconds. Even if it can be executed, the person who viewed the web page may have crossed it long ago.
The above ScriptTimeout is the only property of the Server object
2. Server.HtmlEncode
HtmlEncode is one of the methods of Server objects. It allows you to HTML encode specific strings, and while HTML can display most of the text you write to ASP files, you will run into problems when you need to actually include the characters used in the HTML tag. This is because when the browser reads such a string, it tries to explain it.