TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 2:00 pm




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Connection Reset error from HTTPDownloadEx function.
PostPosted: Thu Nov 04, 2010 10:44 am 
Offline

Joined: Thu Nov 04, 2010 10:26 am
Posts: 4
Location: Iowa
I have an image that is frequently reused, so I've created a button that adds the common page to the image buffer.

Here's the code for my button:
<input id="btnDocSeparator " onclick="return btnDocSeparator _onclick()" type="button" value="Doc Separator">

Here's the function:
function btnDocSeparator _onclick() {
frmScan.DynamicWebTwain1.HTTPDownloadEx("localhost", "WebCapture/PATCHCODE4.tif", 2);
if (frmScan.DynamicWebTwain1.ErrorCode != 0) {
alert(frmScan.DynamicWebTwain1Thumbnail.ErrorString);
}
}

This works well for a short time after the application is opened, but if you let it sit for approximately 2-5 minutes and click the button it will pause for a while and then throw the following error:
"The connection with the server was reset". If I refresh the page the buffer clears and the function will work again for several minutes.

I tried rewriting the function to use HTTPDownload() instead of HTTPDownloadEx(), but it has the same problem. Do you have any suggestions?


Thanks,
William Davis


Top
 Profile  
 
 Post subject: Re: Connection Reset error from HTTPDownloadEx function.
PostPosted: Sun Nov 07, 2010 5:53 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi William,

The code seems all right.

We tried on our side, and the issue didn't occur. We think that the issue on your side could have been caused by unstable network. Such as Connection Timeout of the server etc. Would you please check this on your side?

Also, you can try the line below and see if the same issue repeats:
Code:
frmScan.DynamicWebTwain1.HTTPDownloadEx("www.twain.org","/images/logo_med.jpg",1);

Please keep us updated on the issue.

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
 Post subject: Re: Connection Reset error from HTTPDownloadEx function.
PostPosted: Thu Apr 21, 2011 1:17 pm 
Offline

Joined: Thu Nov 04, 2010 10:26 am
Posts: 4
Location: Iowa
I was able to fix this problem by executing the following code when I load the page that contains the Dynamsoft ActiveX control:

frmScan.DynamicWebTwain1.HTTPPort = 443;
frmScan.DynamicWebTwain1.IfSSL = true;

I had the HTTPPort parameter set to "443" in my Web Twain object, but I wasn't setting the IfSSL property to true. This caused HTTPDownloadEx to work initially, but break after a few minutes.


Top
 Profile  
 
 Post subject: Re: Connection Reset error from HTTPDownloadEx function.
PostPosted: Thu Apr 21, 2011 5:08 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi William,

I'm glad to hear that you've solved the problem by yourself. :)

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

It is currently Sun May 20, 2012 2:00 pm


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog