Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


12003 ERROR_INTERNET_EXTENDED_ERROR

 Keywords: 12003 Error  iFtpPut 

Question:

I am using the Wininet internet extender. I am getting a 12003 return from iftpput. Here is the code:
==============================================================

:ftpsend
lit = "Opening ftp session..."
BoxDrawText(wbid,"25,350,1000,1000",lit,1,0)
TopHandle=iBegin(0,"","")
ConHandle=iHostConnect(TopHandle,pdx,@FTPPASSIVE,UserId,Pswd)
if ConHandle==0
  Message("FTP Open Error",strcat("Error starting ftp session ",hSession,@crlf,"Contact Support Central"))
  exit
else
  lit = "Connected"
  BoxDrawText(wbid,"500,350,1000,1000",lit,1,0)
endif

iftpdirmake(conhandle,"/usr/pdx/pcfiles/%pcnum%")
iFtpDirChange(conhandle,"/usr/pdx/pcfiles/%pcnum%")

DirChange("C:\zipfiles")

lit = "Sending DOCS files..."
BoxDrawText(wbid,"25,450,1000,1000",lit,1,0)
if FileExist("rxdocs.zip")
  rs = iftpPut(conhandle,"c:\zipfiles\rxdocs.zip","/usr/pdx/pcfiles/%pcnum%/rxdocs.zip",0,@binary)
  err=iGetLastError()
  errmsg = igetresponse()
  if rs != "" 
    lit = strcat("Error copying DOCS - ",err," ",errmsg)
    BoxDrawText(wbid,"500,450,1000,1000",lit,1,0)
  else
    lit = "Complete"
    BoxDrawText(wbid,"500,450,1000,1000",lit,1,0)
  endif
else
  lit = "No DOCS files to send..."
  BoxDrawText(wbid,"500,450,1000,1000",lit,1,0)
endif
  
===================================================================

Here is the trace output that corresponds with the code:

===================================================================

lit = "Opening ftp session..."
(36903) VALUE=> "Opening ftp session..."

BoxDrawText(wbid,"25,350,1000,1000",lit,1,0)
(38265) VALUE=> 1

TopHandle=iBegin(0,"","")
(40408) VALUE=> 13369348

ConHandle=iHostConnect(TopHandle,pdx,@FTPPASSIVE,UserId,Pswd)
(57242) VALUE=> 13369352

if ConHandle==0
(66645) ELSE DO==>TRUE

lit = "Connected"
(66645) VALUE=> "Connected"

BoxDrawText(wbid,"500,350,1000,1000",lit,1,0)
(67366) VALUE=> 1

endif
(67987) END OPERATOR

iftpdirmake(conhandle,"/usr/pdx/pcfiles/3")
(68618) VALUE=> 0

iFtpDirChange(conhandle,"/usr/pdx/pcfiles/3")
(69189) VALUE=> 1

DirChange("C:\zipfiles")
(71563) VALUE=> 1

lit = "Sending DOCS files..."
(72644) VALUE=> "Sending DOCS files..."

BoxDrawText(wbid,"25,450,1000,1000",lit,1,0)
(90850) VALUE=> 1

if FileExist("rxdocs.zip")
(91591) IF DO==>TRUE

rs = iftpPut(conhandle,"c:\zipfiles\rxdocs.zip","/usr/pdx/pcfiles/3/rxdocs.zip",0,@binary)
(99433) VALUE=> 0

err=iGetLastError()
(104089) VALUE=> 12003

errmsg = igetresponse()
(105702) VALUE=> "0: 250 CWD command successful.
200 Type set to I.
"

if rs != ""
(161552) IF DO==>TRUE

lit = strcat("Error copying DOCS - ",err," ",errmsg)
(162003) VALUE=> "Error copying DOCS - 12003 0: 250 CWD command successful.
200 Type set to I.
"

BoxDrawText(wbid,"500,450,1000,1000",lit,1,0)
(162453) VALUE=> 1

else
(196873) END OPERATOR

else
(199216) END OPERATOR

lit = "Sending WinFax files..."
(199216) VALUE=> "Sending WinFax files..."

BoxDrawText(wbid,"25,550,1000,1000",lit,1,0)
(200648) VALUE=> 1

if FileExist("rxwfx.zip")
(201810) ELSE DO==>TRUE

lit = "No WinFax files to send..."
(201810) VALUE=> "No WinFax files to send..."

BoxDrawText(wbid,"500,550,1000,1000",lit,1,0)
(202280) VALUE=> 1

endif
(203162) END OPERATOR

lit = "Closing ftp session..."
(203682) VALUE=> "Closing ftp session..."

BoxDrawText(wbid,"25,650,1000,1000",lit,1,0)
(204143) VALUE=> 1

iClose(conhandle)
(205425) VALUE=> 1

iClose(tophandle)
(205996) VALUE=> 1

lit = "Closed"
(207568) VALUE=> "Closed"

BoxDrawText(wbid,"500,650,1000,1000",lit,1,0)
(209651) VALUE=> 1

return
(211664) RETURN VALUE=> 0

==============================================================

What the heck is going on? The responses don't seem to relate to the iftpPut. It's almost like the response is one or two commands behind the command being executed. HELP!!!!!!!!

Answer:

You may want to look at the MS article :

Article ID: Q168492


MORE:

Question:

We just finished upgrading a system from NT to Win2k server. I have a script that uses iftpput that worked fine under NT, but with win2k it is now returning a 12003 error. I referenced to ms knowledgebase article q168492. The article implied that if I change from ftppassive to ftp during the host connect, my problem would go away. Tried changing to ftp and still have the same error.

Any ideas?

Thanks in advance.

Answer:

12003 ERROR_INTERNET_EXTENDED_ERROR
An extended error was returned from the server. This is typically a string or buffer containing a verbose error message.
Call iGetResponse just after the iFtpPut to retrieve the error text. Then display the iGetReponse info. If not obvious, then let us know what it says, and post a section of your script, or better yet write a short test script that demonstrates the problem so we can also run it here.

User Reply:

After your note, I dug a little deeper and discovered that the ftp had broken because the destination machine was no longer mapping to the same directory. My issue was caused by an iFtpPut to a nonexistant directory. Thanks for your help. Hopefully just knowing a 12003 can be caused by nonexistant directories will help the next programmer.
Article ID:   W14800