ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old April 13th, 2003, 07:16 PM
spoonman spoonman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Melbourne, Australia
Posts: 15 spoonman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to spoonman
ASP - Server.ScriptTimeout (SAFileup) Problem

i'm sooo confused and stuck here.

i'm using SAFileup to upload files to an IIS server. whenever i try to upload anything over 1.5mb it times out. even when i've bumped up the server.scriptTimeout value to 3600!

tech support at the host (webcentral) say they have no problems uploading a 3mb file. I'm on cable uploading at 20k/s so it shouldn't take long to upload a 3mb file at all....

Below is the code i got from the host to test with. they say it works fine but all my uploads time out. I've tested it on a different computer and ISP (business ADSL) and still the same error.

<%@ Language = "VBScript"%>
<%

'=========================================================================
'=========================================================================
'==== Place this file in the virtual directory and create =====
'==== or use an upload directory with modify permissions. =====
'=========================================================================
'=========================================================================

'the following three lines of code are used to ensure that this page is not cached on the client.
response.cachecontrol = "no-cache"
response.addheader "pragma", "no-cache"
response.expires = -1

'do we ask for the file to upload - "" or do we just upload the file now - "yes"
upload_now = request.querystring("upload_now")
'sub_dir = request.form("sub_dir")




'lets check the querystring to see what to do
select case upload_now


case ""
'OK so we are going to show the upload form...
'first specify a directory with RWD permissions
if sub_dir = "" then
sub_dir = "a directory with RWD permissions"
end if
'where has this script been placed within the website?
virtual_path = Request.ServerVariables("PATH_INFO")
physical_path = Server.MapPath(virtual_path)
upload_path = Server.MapPath(sub_dir)

'Response.Write "Virtual path: <b>" & virtual_path & "</b><br />"
'Response.Write "Physical path: <b>" & physical_path & "</b><br />"
'Response.Write "Upload path: <b>" & upload_path & "</b><br />"

Server.ScriptTimeout = 3600
response.write "Server.ScriptTimeout = " & Server.ScriptTimeout
%>

<form enctype="multipart/form-data" name="uploader" method="post" action="saf_test.asp?upload_now=yes"><br>
<input type="file" name="file_name" size="20"><br />
The upload Directory?: <br />
<input type="text" name="sub_dir" value="test/" size="30"><br />
<input type="reset" value="Reset" name="reset"> ::
<input type="submit" value="Submit" name="submit"><br />
</form>

<%
case "yes"


'Now we are going to upload the file
'response.write "upload_now: <b>" & upload_now & "</b><br>"


'---- instanciate SAFileUp ----
Set upl = Server.CreateObject("SoftArtisans.FileUp")



'---- the upload path e$\Inetpub\svc226\sub\directory\whatever

sub_dir = upl.Form("sub_dir")
'virtual_path = Request.ServerVariables("PATH_INFO")
'response.write "virtual_path: " & virtual_path & "<br>"
'physical_path = Server.MapPath(virtual_path)
'response.write "physical_path: " & physical_path & "<br>"

Set fs=Server.CreateObject("Scripting.FileSystemObject")
p_path=fs.GetParentFolderName(virtual_path)
set fs=nothing

upload_path = p_path & sub_dir
response.write "upload_path: " & upload_path & "<br>"
upl.Path = upload_path

'---- check to see if the field is empty or not
for each item in upl.form
if Not IsObject(upl.form(item)) Then
Else

if upl.Form(item).isEmpty Then
Else

'---- get the filename
file_name = Mid(upl.Form(item).userfilename,instrrev(upl.Form(item).userfilename,"\")+1)
response.write "file_name:" & file_name & "<br>"
'---- upload the image when permissions are applied
upl.Form(item).SaveInVirtual upload_path & file_name
End IF

'---- and view data
response.write "<br /><center>Type: "
response.write upl.ContentType
response.write " | Size: "
response.write upl.TotalBytes
response.write " bytes | filename: " & file_name & " <center><br /><br /> has been uploaded </b><br /><a href='saf_test.asp'>:: go back ::</a><br /></center>"
End IF
next
'---- all done
end select
%>
_______________________________________________

the error is:

error 'ASP 0113'
Script timed out
/admin/file_upload/saf_test.asp
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.

Last edited by spoonman : April 15th, 2003 at 01:32 AM.

Reply With Quote
  #2  
Old April 14th, 2003, 02:18 PM
defjamninja defjamninja is offline
Overly white
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83 defjamninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
It looks like you have the script timeout set to 700 seconds which is ruffly 12 mins. Are you taking longer than 12 mins to upload the file? Also is this just starting or has it always been this way? What I mean is could you ever upload files larger than 2MB?

Reply With Quote
  #3  
Old April 15th, 2003, 01:33 AM
spoonman spoonman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Melbourne, Australia
Posts: 15 spoonman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to spoonman
i've modified my original post.

since i started developing on this site its been happening yeah.

arghhhhhhhhhhh!!!

Reply With Quote
  #4  
Old April 15th, 2003, 02:11 PM
defjamninja defjamninja is offline
Overly white
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83 defjamninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Well I have no idea. Could you goto the website of who ever makes SAFileup and get support there?

Reply With Quote
  #5  
Old April 15th, 2003, 05:32 PM
spoonman spoonman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Melbourne, Australia
Posts: 15 spoonman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to spoonman
fixeddddd!!

webcentral kept giving me test ASP files and the last one actually always worked

i think they decided to use an explicit path to the upload directory.

thanks for trying to help

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP - Server.ScriptTimeout Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway