login about faq

I can upload very small files (e.g. 500 bytes), but anything larger I get the error shown below. This is IIS 7 on the server, and something is timing out after about 4 seconds. This happens in Firefox 15.01, IE8 and Chrome.

Output: bSuccess= 1 receiver.NumFilesReceived= 0

receiver.LastErrorHtml= ChilkatLog:

Consume:

    DllDate: Aug 5 2012
    UnlockPrefix: NONE
    Username: BUZZARD:IUSR
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    bAsp: 1
    contentType:
    requestMethod:
    Assuming this is a POST...
    ContentLength: (NULL)
    numParts: 0
    Success.

Code:

<form method="POST" enctype="multipart/form-data" action = "upload_test2.asp" >

Add a file attachment to the email:<br>
<input name=attach1 type=file size=20><br><br>
<input type=submit value="Upload and Email">
</form>

<%
' CLASSIC ASP
const constFolder = "c:\resp-tech\website\live\attachments"
set receiver = Server.CreateObject("Chilkat.UploadRcv")

'  Set a timeout just in case something hangs
'  This is a 20-second timeout:
receiver.IdleTimeoutMs = 20000
receiver.UploadDir = constFolder
receiver.SaveToUploadDir = 1

' Consume the upload.  Files are streamed to the UploadDir
bSuccess = receiver.Consume()

response.write "<p>bSuccess= " & bSuccess
response.write "<p>receiver.NumFilesReceived= " & receiver.NumFilesReceived
response.write "<p>receiver.LastErrorHtml= " & receiver.LastErrorHTML
%>

asked Oct 15 '12 at 12:31

PaulD's gravatar image

PaulD
1112

edited Oct 16 '12 at 03:53


To answer my own post, the problem was with the IIS: Behavior -> Limits Properties -> Maximum Requesting Entity Body Limit This was set to 200000 (20k) which explains the size problem Now set to 2000000 (2Mb) and all works fine

link

answered Oct 16 '12 at 04:07

PaulD's gravatar image

PaulD
1112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7
×1

Asked: Oct 15 '12 at 12:31

Seen: 1,140 times

Last updated: Oct 16 '12 at 04:07

powered by OSQA