iURLOpen fails in 'debug'

Started by wagert, May 08, 2014, 11:20:49 AM

Previous topic - Next topic

wagert

I posted a comment in another thread.. http://forum.winbatch.com/index.php?topic=911.msg3969#msg3969 ..

and .. IJRobson  posted a response..  thought i would start this in another thread.

..

I have some code where when i 'run' it in Studio, works ok.. but when i 'debug' in Studio, fails..   iURLOpen completes ok when run, but fails when debugging.

I don't know why it's working when run and fails when debugged.

the error i get in debug is 12029 ..  but works ok when run

Any suggestions?

IJRobson's response alludes to 'paths' .. i'm not where this comes into play..  there is no place where i specify any 'paths' to executables. 

This code used to work fine (and debug ok too).. but now doesn't

thanks
scott

Deana

Please see: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WIL~Extenders/WinInet+iGetConState~Returns~False.txt

If you continue to have an issue... Simply add DebugTrace(@on,"trace.txt") to the beginning of the script and inside any UDF, run it until the error or completion, then inspect the resulting trace file for clues as to the problem. Feel free to post the trace file here ( removing any private info) if you need further assistance.
Deana F.
Technical Support
Wilson WindowWare Inc.

wagert

OK .. I'm squared away now..

I had been using iURLOpen and had to resort to using an iHostConnect / iHttpInit / iHttpOpen sequence to get the data

I have 2 different URL's which I'm calling to retrieve a glop of XML.

.../transform/public/service/spg/taxonomies?appId=ab67d974-dd64-4d13-90ee-ad3738ed9df8
and
.../transform/public/service/spg/taxonomies/X298560E92920M33/fullSubTree?appId=ab67d974-dd64-4d13-90ee-ad3738ed9df8&properties=PID,DESCRIPTION

(... is the appropriate hostname)

Interestingly, the 1st worked OK with iURLOpen.. the 2nd did not.  I guess the full URL was sufficiently complex in the 2nd case to cause iURLOpen to fail.

Anyway, I'm back to working again.

Thanks
Scott

Deana


Error 12029 indicates ERROR_INTERNET_CANNOT_CONNECT. The attempt to connect to the server failed.

Its not clear why the script would work when "run" but not in "debug mode".

I recommend using DebugTrace.

1.) Add DebugTrace(@on,"traceRUN.txt") to the beginning of the script and inside any UDFs, RUN it in WinBatch Studio

2.) Modify output filename to all of the DebugTrace statements: DebugTrace(@on,"traceDEBUG.txt") , Run in DEBUG  in WinBatch Studio, until the error

3.) Post both traceRUN.txt and traceDEBUG.txt here.
Deana F.
Technical Support
Wilson WindowWare Inc.