Contact us


All times are UTC - 8 hours



   [ 7 posts ] 
Author Message
   


Joined: Mon Mar 23, 2009 5:57 am
Posts: 4
Hi,
I'm having troubles getting Dynamic Web Twain to work on our web server, which hosts multiple websites using IIS. The single web server hosts two web sites (development and stage) and uses Coldfusion.

The web server also shares the same name as the server itself (i.e. server name is "development" and the development website is "development").

Now, when using HTTPPostAllThroughPostAsPDF the calls are:

...HTTPUploadAllThroughPostAsPDF("development","processScan.cfm","*.pdf"); <--- WORKS!

...HTTPUploadAllThroughPostAsPDF("stage","processScan.cfm","*.pdf"); <--- DOESN'T WORK!

With the "stage" website, it errors out because "Element REMOTEFILE is undefined in FORM." The form structure is entirely empty. Again, on the "development" website it processes fine and puts the temp file in the Coldfusion temp directory. Is Dynamic Web Twain limited to serving one web site on a web server?


User avatar
   


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

Dynamic Web TWAIN works fine with multiple websites hosted on one web server. Please make sure "stage" is a valid HTTP server name. You can use Ping command to verify that.

You may take a look at this for more information on the HTTPPostAllThroughPostAsPDF method:
http://www.dynamsoft.com/help/twain/web ... tAsPDF.htm

Thanks.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


   


Joined: Mon Mar 23, 2009 5:57 am
Posts: 4
Hi Catherine,
I can ping both as both websites have a DNS entry but each site points to the same IP address. I chatted with another support agent today but still have not resolved it. I think I can skim this down to a simpler example.

Computer name: WEB_SERVER
Website address: myWebSite

I've been told the call should be:
HTTPUploadAllThroughPostAsPDF(
"WEB_SERVER",
"/scan/processScan.cfm"
"*.pdf");

When I do this call I get a "Page not Found" because (I assume) it's trying to go to http://WEB_SERVER/scan/processScan.cfm but this doesn't exist, it should be going to http://myWebSite/scan/processScan.cfm.

My problems seem to go away when Computer name = Website address.

Any ideas?


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Quote:
When I do this call I get a "Page not Found" because (I assume) it's trying to go to http://WEB_SERVER/scan/processScan.cfm but this doesn't exist,

Yes. It will try to find the action page at http://WEB_SERVER/scan/processScan.cfm.

You can try the following lines for uploading. To test the code, please place the scan page and the action page (processScan.cfm) in the same folder.
================================================================
var strActionPage;
var strHostIP;
var CurrentPathName = unescape(location.pathname); // get current PathName in plain ASCII
var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1);
strActionPage = CurrentPath + "processScan.cfm"; //the ActionPage's file path

strHostIP = "YourServerName"; //the host's ip or name
frmScan.DynamicWebTwain1.HTTPPort = 80;

frmScan.DynamicWebTwain1.HTTPUploadAllThroughPostAsPDF("strHostIP", strActionPage, "test.pdf");

alert(frmScan.DynamicWebTwain1.ErrorString);

if (frmScan.DynamicWebTwain1.ErrorString == "HTTP process error")
alert (frmScan.DynamicWebTwain1.HTTPPostResponseString);
================================================================

For the path of the uploaded images, it can be specified in the action page.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


   


Joined: Mon Mar 23, 2009 5:57 am
Posts: 4
Hi Catherine,
I tried that bit of code but it still says "Page not found". I think the problem is that http://WEB_SERVER (and the server's IP) is not a valid website and is not being hosted by IIS. Can you confirm that I need to create a default web site that will respond to either the SERVER name or to its IP Address (or add it to the host header of an existing website)?

I think that is what I am understanding and therefore I would have to create a central processing "website" that would be the default website on the server, which would respond on http://WEB_SERVER or its IP address and then route processing to appropriate scanning processing pages.


   


Joined: Mon Mar 23, 2009 5:57 am
Posts: 4
Okay, I have resolved my issue by creating a 3rd website, which listens on the server's IP address. The action page takes parameters to determine whether or not to attach the scan to the "development" database or the "stage" database.

Thank you for your help.


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Great! :D

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Display posts from previous:  Sort by  
   [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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:
cron
Copyright © 2018 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team
Fatal: Not able to open ./cache/data_global.php