Recommended: ASP Q&A Solution to the ASP script running timeout I'm learning server knowledge recently. Sometimes I encounter an error in which the asp script runs timeout, which is really troublesome. I found relevant information, and there are some solutions. The default script timeout of IIS is 90 seconds. If you upload software or transfer data more than 90 seconds.
1. Tips for creating objects in ASPWhen we use server components to create objects, there are generally two methods. The most commonly used method is to use the CreateObject() method of the SERVER object, like this:
SET NextLink = Server.CreateObject(MSWC.NextLink)
This method is very useful, but there is another way to save system resources more.
When you use the Server.CreateObject() method to create an object, the object is loaded immediately, and the system allocates memory and other resources to the object.
The second way to create an object is to use the <OBJECT> tag of HTML, and the syntax is as follows:
< OBJECT Runat=Sever ID=NextLink ProgID=MSWC.NextLink >< /OBJECT >
When creating an object with the <OBJECT> tag, the object you want to create is not loaded immediately, but will not load until the method or attribute of the object is referenced for the first time. In this way, we will save some resources. Although not many, it is very helpful to save server resources when your system has to withstand nearly a million clicks a day.
2. Two solutions to ASP Chinese display
The first major problem that the author encountered when he first started writing ASP programs was the Chinese display problem. After running it, he found that all the Chinese read from the ASP from the database became ?????, which is a bit similar to the most frequent Chinese display problem in JSP. After checking the data, he found that there is a way to easily solve the Chinese problem.
Method 1:
After reading Microsoft NGWS documents, I found that in the FAQ section of the document, I mentioned that I wanted to add a config.web file to the web directory. I tried it and it was OK in Chinese.
The method is as follows:
Create a file config.web, with the content as follows, and placed in the WEB directory
<configuration>
<globalization
requestedcoding=utf-8
responseencoding=utf-8
/>
</configuration>
Later I saw someone posted a post in the forum online saying that it would be fine to replace utf-8 with gb2312. The author has not tried it, so you can give it a try.
Method 2:
Later, I subscribed to Microsoft's news group and found articles discussing this issue in Microsoft's news group dotnet.framework.aspplus.general. The method is to add <%@ CODEPAGE = 936 %> to the beginning of each page, which is a bit similar to <%@ page contentType=text/html;charset=gb2312%> in jsp and tested it quickly.
Share: jscript error code and corresponding explanation JScript Syntax Error JScript Syntax error refers to an error that occurs when a JScript statement violates one or more syntax rules of the JScript scripting language. A JScript syntax error occurs during the program compilation phase, before starting to run the program. (The error occurred in