The leading provider of version control solution and TWAIN SDK

Error message: HTTP process error

Symptom:

When you upload images using the HTTPUploadThroughPost*** method, you may receive the following error messages:



Cause:

1. The write permission is not granted to the specified directory on the web server.

2. The action page is incorrect or returns something from Web server.

3. The Port for uploading is not right.

4. The size of the images you try to upload is beyond the maximum allowed size set on the server.

Dynamic Web TWAIN uses a special way to see if an image is uploaded and processed successfully by server. If the server returns 0 byte, indicates success. Otherwise, indicates failure. In other words, when the uploaded image is processed successfully, the action page on the server should not return anything.

Resolution:

1. Make sure the users who are uploading have the permission to write images to the specified directory on the Web Server. (For example, give "Write" permission to the Authenticated Users.)

2.Please check the response string returned from the HTTP server. The response string can help you figure out the cause of the process error. You can get this string by using the HTTPPostResponseString property. Click here for more information about the property.

3. Set the Port with the property HTTPPort. (For example: If the URL for the scan page is "http://localhost:3253/....", you need to set the port to 3253).

We recommend you get the Port and Server value this way:
strHTTPServer = location.hostname;
WebTWAIN.HTTPPort = location.port==""?80:location.port;

NOTE:
If you set the IfSSL property to true, please note you must set a secure port for HTTPPort property. For example,

WebTWAIN.IfSSL = true;
WebTWAIN.HTTPPort = 443;

4. Please reset the maximum transferable data size:

If you are using ASP:

If you are using IIS 6:
1) Start -> Run , type "cmd"
2) Go to "C:\Inetpub\AdminScripts" by typing: cd C:\Inetpub\AdminScripts
3) To view max request entity allowed:
cscript adsutil.vbs get w3svc/AspMaxRequestEntityAllowed

If you are using IIS 7:
1) Start -> Run , type "InetMgr" to open IIS 7 Manager
2) {Your WebSite}->Feature View->ASP->Limites Properties
3) Set "Maximum Requesting Entity Body Limit" to a bigger value like "1000000"


To set max request entity allowed:
cscript adsutil.vbs set w3svc/AspMaxRequestEntityAllowed 1000000 (You can change the value by yourself.)

If you are using ASP.NET, you can change the value at the following line in the "Web.Config" file.
<httpRuntime maxRequestLength="1000000"/> (You can change the value by yourself.)

If you are using ASP.NET on IIS 7, you might need to add the below line as well:
<requestLimits maxAllowedContentLength="300000000" />. For more info, please click here. Below is a simple sample:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
    <httpRuntime executionTimeout="3000"  maxRequestLength="102400"/>
        <compilation debug="true" />
    </system.web>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="300000000" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

If you are using PHP, you can change the value at the following line in the php.ini file:
upload_max_filesize = 2M (You can change the value by yourself.)

Also, you can send the screenshot of the response string to twainsupport@dynamsoft.com so that we can help you pinpoint the cause of the issue.




Article Details

Last Updated
18th o May, 2012

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (9 votes)

88% thumbs up 11% thumbs down

How would you rate this answer?



Thank you for rating this answer.

Related Articles

Attachments

No attachments were found.

Visitor Comments

  1. Comment #1 (Posted by Francesco Facco de Lagarda )
    I see that you've already included the second msg box to display the "HTTPPostResponseString" in case the error is "HTTP process error". Unfortunately I get a blank msgbox! I'm using 2003 Server (whatever IIS that is) and have given both IIS_xx and EVERYONE users full control of the subfolder. I have a feeling it might be about the maximum post size or something like that, but I get the error immediately ...
  2. Comment #2 (Posted by support )
    Yes, you are right. When the size of the images you try to upload goes beyond the maximum transferable data size which is defined by the server. You will also get this error or the message might be "The handle is in the wrong state for the requested operation". To solve this, you can check out this article: http://kb.dynamsoft.com/questions/141/Error+message%3A+The+handle+is+in+the+wrong+state+for+the+requested+operation
  3. Comment #3 (Posted by Eric )
    I was running Visual Studio 2010 and using the internal webserver which uses ports. I had localhost:xxxxx as the value for strHTTPServer. It did not like that. Here's what I did: - I created a new Application under IIS - Set everything up, applied the proper permissions, etc. - I created a new appPool using Framework 4 then I went into the advanced settings of that appPool and set Enable32bitApplications to TRUE. After that everything worked perfectly.
  4. Comment #4 (Posted by Kaley )
    Free knowledge like this doesn't just help, it promote doemcrcay. Thank you.
  5. Comment #5 (Posted by Chelsi )
    I'm not quite sure how to say this; you made it etxremley easy for me!

Post a comment

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
* Enter the code below:
 

Continue