1、IIS為一個(gè)死循的執(zhí)行過程設(shè)定執(zhí)行時(shí)間(缺省為90秒)超時(shí)事件:
%response.buffer=true%>
body>html>
%
DO
counter=counter+1
response.write counter "br>"
response.flush
LOOP
%>
/body>/html>
2、自定義時(shí)間。用程序設(shè)定超時(shí)事件的時(shí)間段:
%
response.buffer=true
server.scripttimeout=20
%>
body>html>
%
DO
counter=counter+1
response.write counter "br>"
response.flush
LOOP
%>
/body>/html>
3、干涉超時(shí)時(shí)間段。捕獲超時(shí):
%@ trANSACTION=Required%>
%
response.buffer=true
server.scripttimeout=20
%>
html>body>
/body>
%
DO
counter=counter+1
response.write counter "br>"
LOOP
response.flush
response.write "腳本運(yùn)行完啦!"
%>
/html>
%
Sub OnTransactionAbort()
response.clear
Response.Write "噢,腳本運(yùn)行超時(shí)了!"
end sub
%>
4、繞過超時(shí)事件:
%@ trANSACTION=Required%>
%
response.buffer=true
server.scripttimeout=40
%>
html>body>
/body>
%
DO UNTIL counter=400
counter=counter+1
response.write counter "br>"
LOOP
response.flush
response.write "腳本運(yùn)行完啦!"
%>
/html>
%
Sub OnTransactionAbort()
response.clear
Response.Write "噢,腳本運(yùn)行超時(shí)了!"
end sub
%>
標(biāo)簽:柳州 中山 雞西 朔州 遵義 邯鄲 威海 襄陽
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《如何處理超時(shí)事件?》,本文關(guān)鍵詞 如何,處理,超時(shí),事件,如何,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。