开发者

Script timeout being ignored by VB DLL

开发者 https://www.devze.com 2023-01-24 13:40 出处:网络
Very briefly: I\'m h开发者_Go百科aving an issue with ensuring that VB DLLs honour the timeouts set in IIS and ASP.

Very briefly: I'm h开发者_Go百科aving an issue with ensuring that VB DLLs honour the timeouts set in IIS and ASP.

A site I work on uses a number of home-rolled DLLs and their methods could, potentially, run for longer than a web user is willing to wait. If the visitor presses Escape or closes their browser then the process naturally continues on the server, sucking up CPU time and memory.

In my ASP I have set server.scriptTimeout to a low number (let's say 10 seconds) and I've done the same thing in IIS for the whole web app (because I know server.scriptTimeout is ignored if it is lower than the IIS timeout).

If I run my ASP page with nothing in it but a loop that runs a few million times then the script does time out properly ie after 10 seconds. However, if I move that loop into a very simple DLL (which is then registered properly with COM+) then my script runs for about 210 seconds before timing out.

So my question is: how can I make the script time out as I have asked it to?


As I understand it the ASP engine passes control to the DLL when it makes the call to a method in a DLL. Until the method returns, ASP is not actually calling the shots, once the call returns, it realized that the time has exceeded and ends the script execution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号