脚本超时消息添加到二进制文件结束 [英] Script timed out Message added to Binary File End

查看:58
本文介绍了脚本超时消息添加到二进制文件结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,


我的代码是BinaryWrite使用

ADO Stream向客户端提供20mb的EXE文件。下载后,EXE文件正常工作没有任何问题。


当我验证EXE下载到客户端机器时,EXE已经

添加了下面的文字到底:

-------------------------------------- -------

< font face =" Arial" size = 2>。< p> Active Server Pages< / font> < font face =" Arial"

size = 2>错误''ASP 0113''< / font>。< p>。< font face =" Arial" size = 2>脚本定时

out< / font>。< p>。< font face =" Arial"

size = 2> / Roctek / ProcessDownload .asp< / font>。< p>。< font face =" Arial" size = 2>

超出了脚本执行的最长时间。您可以通过为属性Server.ScriptTimeout

指定新值或通过更改IIS管理工具中的值来更改

此限制。< / font>

------------------------------------------- ---


所以我可以看到它是一个脚本TimeOut错误。那么请你指导我

问题的来临,我该如何纠正这个问题。 (包括ASP

代码,BinaryWrite文件)

------------------------ ---------------------

函数DownloadFile(strFilename)

dim stFile

Response.Buffer = True

Response.Clear


设置stFile = Server.CreateObject(" ADODB.Stream")

stFile.Open

stFile.Type = 1''设为二进制


出错时继续


设置fso = Server.CreateObject(" Scripting.FileSystemObject")

如果不是fso.FileExists(strFilename)那么

Response.Write("< h1>请求的文件不存在!请联系Roctek

支持。< / h1>< P>")

Response.End

结束如果

设置fFile = fso.GetFile(strFilename)

iFileLength = fFile.Size


stFile.LoadFromFile(strFilename)


Response.AddHeaderContent-Disposition,附件;文件名= QUOT; &

fFile.Name

Response.AddHeader" Content-Length",iFileLength

Response.Charset =" UTF-8"

Response.ContentType =" application / octet-stream"


Response.BinaryWrite stFile.Read

Response.Flush

Response.Buffer = False

Response.Clear


设置fso = Nothing

设置fFile =没有什么

stFile.Close

设置stFile =没什么

结束功能

-------- -------------------------------------------------- -


我在Windows 2000 Server上使用IIS 5。请指导我解决

问题


谢谢

Prabhat

解决方案

Prabhat写道:

嗨朋友们,

我的代码将是BinaryWrite。使用ADO Stream向客户端提供20mb的EXE文件。下载后,EXE文件运行正常
没有任何问题。

当我验证下载到客户端机器的EXE时,EXE将以下文本添加到底部:
---------------------------------------------
< font face =" Arial" size = 2>。< p> Active Server Pages< / font> < font
face =" Arial" size = 2>错误''ASP 0113''< / font>。< p>。< font face =" Arial"
size = 2>脚本超时< / font>。< p> ;。< font face =" Arial"
size = 2> /Roctek/ProcessDownload.asp< / font>。< p>。< font face =" Arial"
size = 2>超出了脚本执行的最长时间。您可以通过为
属性Server.ScriptTimeout指定新值或通过更改IIS管理工具中的值来更改此限制。< / font>
----- -----------------------------------------

所以我可以看到它是一个脚本TimeOut错误。那么请你指点一下问题的来源以及如何纠正这个问题。
(包括BinaryWrite文件的ASP代码)




你的谷歌技能有问题吗?或者你的搜索能力
www.aspfaq.com?

将此添加到您的页面:

Server.ScriptTimeout =<无论什么值消除错误>

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。


您的Google技能有问题?或者你的搜索能力
www.aspfaq.com?

将此添加到您的页面:
Server.ScriptTimeout =<消除错误所需的任何值>
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。我的From
标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。您将通过发布到新闻组获得更快的回复。



您好Bob,


我知道我们可以使用<%Server.ScriptTimeout = n%>但是我想

知道这是解决问题的正确方法吗?


但是我想知道如果还有其他方法我可以做在我的asp

代码中传输文件。另外如果我在任何程序中设置超时将

超时是程序的本地或应用程序的全局?


谢谢

Prabhat


>你的谷歌技能有问题吗?或者你的搜索能力

www.aspfaq.com?

将此添加到您的页面:
Server.ScriptTimeout =<消除错误所需的任何值>
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。我的From
标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将得到更快的回复。



关于脚本超时我看过页面:
http://www.aspfaq.com/show.asp?id=2066


Hi Friends,

I have code that will "BinaryWrite" a EXE file of 20mb to client using the
ADO Stream. After the download the EXE file works fine without any problem.

When I verified the EXE that gets downloaded to client machine that EXE has
the below text added to the bottom:
---------------------------------------------
<font face="Arial" size=2>.<p>Active Server Pages</font> <font face="Arial"
size=2>error ''ASP 0113''</font>.<p>.<font face="Arial" size=2>Script timed
out</font>.<p>.<font face="Arial"
size=2>/Roctek/ProcessDownload.asp</font>.<p>.<font face="Arial" size=2>The
maximum amount of time for a script to execute was exceeded. You can change
this limit by specifying a new value for the property Server.ScriptTimeout
or by changing the value in the IIS administration tools..</font>
----------------------------------------------

So I can see that it is a Script TimeOut Error. So can you please guide me
where the problem is comming and how can I rectify this. (Including the ASP
code that BinaryWrite the file)
---------------------------------------------
Function DownloadFile(strFilename)
dim stFile
Response.Buffer = True
Response.Clear

Set stFile = Server.CreateObject("ADODB.Stream")
stFile.Open
stFile.Type = 1 ''Set as BINARY

On Error Resume Next

Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FileExists(strFilename) then
Response.Write("<h1>Requested file does not exists! Please contact Roctek
Support.</h1><P>")
Response.End
end if
Set fFile = fso.GetFile(strFilename)
iFileLength = fFile.Size

stFile.LoadFromFile(strFilename)

Response.AddHeader "Content-Disposition", "attachment; filename=" &
fFile.Name
Response.AddHeader "Content-Length", iFileLength
Response.Charset = "UTF-8"
Response.ContentType = "application/octet-stream"

Response.BinaryWrite stFile.Read
Response.Flush
Response.Buffer = False
Response.Clear

Set fso = Nothing
Set fFile = Nothing
stFile.Close
Set stFile = Nothing
End Function
-----------------------------------------------------------

I am using IIS 5 on Windows 2000 Server. Please guide me to solve the
problem

Thanks
Prabhat

解决方案

Prabhat wrote:

Hi Friends,

I have code that will "BinaryWrite" a EXE file of 20mb to client
using the ADO Stream. After the download the EXE file works fine
without any problem.

When I verified the EXE that gets downloaded to client machine that
EXE has the below text added to the bottom:
---------------------------------------------
<font face="Arial" size=2>.<p>Active Server Pages</font> <font
face="Arial" size=2>error ''ASP 0113''</font>.<p>.<font face="Arial"
size=2>Script timed out</font>.<p>.<font face="Arial"
size=2>/Roctek/ProcessDownload.asp</font>.<p>.<font face="Arial"
size=2>The maximum amount of time for a script to execute was
exceeded. You can change this limit by specifying a new value for the
property Server.ScriptTimeout or by changing the value in the IIS
administration tools..</font>
----------------------------------------------

So I can see that it is a Script TimeOut Error. So can you please
guide me where the problem is comming and how can I rectify this.
(Including the ASP code that BinaryWrite the file)



Is something wrong with your google skills? Or your ability to search
www.aspfaq.com?

Add this to your page:
Server.ScriptTimeout =<whatever value it takes to eliminate the error>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


Is something wrong with your google skills? Or your ability to search
www.aspfaq.com?

Add this to your page:
Server.ScriptTimeout =<whatever value it takes to eliminate the error>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


Hi Bob,

I am aware that we can use <% Server.ScriptTimeout = n %> but I wanted to
know is this the correct aproach to Solve???

But I am wondering that if there is some other way that I can do in my asp
code that stream the file. Also If I set the timeout in any procedure will
that timeout be local to procedure or global to application?

Thanks
Prabhat


> Is something wrong with your google skills? Or your ability to search

www.aspfaq.com?

Add this to your page:
Server.ScriptTimeout =<whatever value it takes to eliminate the error>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


About Script Timeout I have seen the page:
http://www.aspfaq.com/show.asp?id=2066


这篇关于脚本超时消息添加到二进制文件结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆