Recommended: ASP Tutorial: Methods to solve the timeout of ASP script running 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.
ASP realizes instant display of the current page viewer
online.asp file
| The following is the quoted content: <!--#include file=dbconn.asp --> <% onlineTimeout=10 ''Define the time interval for online activity Function Userip() GetClientIP = Request.ServerVariables(HTTP_X_FORWARDED_FOR) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If GetClientIP = or isnull(GetClientIP) or isempty(GetClientIP) Then GetClientIP = Request.ServerVariables(REMOTE_ADDR) '''''''''''''''''''''''''''''''''''''''If you don't use a proxy server, you will get the source IP address End If Userip = GetClientIP End Function sql=select o_id from c_online where o_ip='' &Userip()& '' Find the id of the obtained IP address in the database Set rs=conn.execute(sql) If rs.eof and rs.bof Then sql=insert into c_online(o_ip) values('' &Userip()& '') If there is no in the database, it means it is a new IP, then the insert operation conn.execute(sql) Else sql=update c_online set o_ltime=now() where o_ip='' &Userip()& '' The current time of the database conn.execute(sql) End If sql=delete from c_online where dateadd(''s'',&onlineTimeout*60&,o_ltime) < now() Define ten minutes to refresh conn.execute(sql) rs.close Set rs=nothing Function allonline() tmprs=conn.execute(Select count(o_id) from c_online) allonline=tmprs(0) set tmprs=nothing end Function %> <%Response.Write document.write(online &allonline()&people)%> |
Share: Solve internal errors of IIS5 HTTP500 1. Errors: IIS5's HTTP 500 internal server error is one of the errors we often encounter. Its main error is that ASP programs cannot browse but HTM static web pages are not affected. In addition, when an error occurs, the system event log and security event log will have corresponding corresponding