Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Script Timeout Before/After Converting to Byte Mode 1

Status
Not open for further replies.

OceanDesigner

Programmer
Oct 30, 2003
173
US
On one of my pages, I read data from the form on the previous page as bytes rather than the regular method (is there a name for the regular, non-byte method?). I know that once I start using byte methods, I can no longer use Request.Form on that page. I wonder if there is the same restriction on Server.ScriptTimeout.

On the same page I extend the script timeout property to allow the user the upload large files. When I put Server.ScriptTimeout after one of bytes methods, it does not seem to register. When I put the same code at the very top of the page (before any byte methods), it seems to work fine. An example of my current code is below. If I move the Server.ScriptTimeout line down before the fileUploaded line, I will timeout when uploading a big file. So I don't think the timeout is being changed.

Code:
<%
'... Some includes up top

'INITIALIZE
  Dim load,fso,oldfile,filename
  Server.ScriptTimeout = 300
  Response.Buffer = True
  Set load = new Loader  ' my byte object
  load.initialize    ' calling initialize method
  ServiceID = load.getValue("ID") ' get ID value from prev form

'UPLOAD
  fileName = LCase(load.getFileName("file"))  ' new File name
  pathToFile = Server.mapPath("Documents/" & fileName)  ' Path
  fileUploaded = load.saveToFile ("file", pathToFile)  ' Uploading
  
  Server.ScriptTimeout = 90
 
ASCII stupid question, get a stupid ANSI...
 
[rofl]
Haha.. too funny - have a star!

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top