How to handle script timeout error in classic ASP?

 ̄綄美尐妖づ 提交于 2020-01-06 06:24:19

问题


In my Classic ASP application I am trying to generate a web report having more than 7K and 14K records respectively, but it shows "Script TimeOut" error after 10 to 15 minutes.

The IIS setting is already more than default value.And also I have written the following code in individual page:

<% server.scriptimeout=4000 %>

Please suggest me how to handle it.


回答1:


You simply cannot create an app that has HTTP requests that hang by a thread for 15 minutes. It's just destined for failure no matter what. You should allow people to request a report, generate it in the background and notify the user the report is still in progress/ready by either email and/or queue.

To even support this you'd need to edit the user's registry: http://support.microsoft.com/kb/813827

It's just not a good design.




回答2:


<% server.scriptimeout=4000 %>

It is very high timeout. You should reduce it. A 180 timeout is sufficient because minimum time out is 90 seconds. I hope this solve your problem now.



来源:https://stackoverflow.com/questions/1822860/how-to-handle-script-timeout-error-in-classic-asp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!